Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix: Link in a heading is rendered as an anchor and becomes invisible. #469

Merged
merged 1 commit into from
Dec 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/refactor-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
{% endif %}

{% assign id = snippet | split: '"' | first %}
{% capture anchor %}<a href="#{{ id }}"><i class="fas fa-hashtag"></i></a>{% endcapture %}
{% capture anchor %}<a href="#{{ id }}" class="anchor"><i class="fas fa-hashtag"></i></a>{% endcapture %}

{% assign left = snippet | split: mark_end | first %}
{% assign right = snippet | replace: left, '' %}
Expand Down
8 changes: 4 additions & 4 deletions _sass/addon/module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@
}

%anchor {
> a {
.anchor {
font-size: 1rem;
margin-left: 0.5rem;
}

@media (hover: hover) {
> a {
.anchor {
border-bottom: none !important;
visibility: hidden;
opacity: 0;
transition: opacity 0.25s ease-in, visibility 0s ease-in 0.25s;
}

&:hover {
> a {
.anchor {
visibility: visible;
opacity: 1;
transition: opacity 0.25s ease-in, visibility 0s ease-in 0s;
Expand All @@ -44,7 +44,7 @@
%anchor-relative {
@extend %anchor;

> a {
.anchor {
position: relative;
bottom: 1px;
}
Expand Down