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
Automatically add nice header linking behavior #280
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,42 @@ | ||
.sl-c-link-header { | ||
|
||
a { | ||
h1, h2, h3, h4, h5, h6 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Each selector in a comma sequence should be on its own single line |
||
a.anchor { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid qualifying class selectors with an element. |
||
display: block; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Properties should be ordered background, border, display, float, margin, vertical-align, width |
||
float: left; | ||
vertical-align: middle; | ||
margin: { | ||
left: -1.5rem; | ||
top: -3px; | ||
} | ||
width: 1.5rem; | ||
background: none; | ||
border: 0; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
|
||
&:after { | ||
margin: { | ||
right: .5rem; | ||
left: 1rem; | ||
}; | ||
font-size: 1rem; | ||
content: "\1F517"; | ||
&::after { | ||
visibility: hidden; | ||
font: { | ||
size: 1rem; | ||
weight: normal; | ||
} | ||
content: "\1F517"; | ||
} | ||
} | ||
|
||
&:hover a.anchor::after { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid qualifying class selectors with an element. |
||
visibility: visible; | ||
} | ||
|
||
&:target { | ||
animation-name: highlight-header; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Properties should be ordered animation-duration, animation-name |
||
animation-duration: 5s; | ||
} | ||
} | ||
|
||
&:hover, | ||
&:focus { | ||
background: none; | ||
@keyframes highlight-header { | ||
from { | ||
background-color: $sl-color--dawn-pink; | ||
} | ||
|
||
&:after { visibility: visible; } | ||
} | ||
to { | ||
background-color: unset; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnusedBlockArgument: Unused block argument - locs. If it's necessary, use _ or _locs as an argument name to indicate that it won't be used.