sass-site/source/assets/css/components/_link-header.scss.erb

67 lines
1.0 KiB
Plaintext
Raw Normal View History

h1, h2, h3, h4, h5, h6, .signature {
a.anchor {
display: block;
float: left;
vertical-align: middle;
margin-top: -3px;
width: 1.5rem;
background: none;
2018-12-29 03:03:50 +01:00
border: 0;
2018-12-29 02:59:53 +01:00
&::after {
2018-12-29 03:01:32 +01:00
visibility: hidden;
font: {
size: 1rem;
weight: normal;
}
content: "\1F517";
2018-12-29 03:01:32 +01:00
}
}
&:hover a.anchor::after {
visibility: visible;
}
}
h1, h2, h3, h4, h5, h6 {
a.anchor {
margin-left: -1.5rem;
}
&:target {
animation-name: highlight-header;
animation-duration: 5s;
}
}
2018-12-29 03:01:32 +01:00
@keyframes highlight-header {
from {
background-color: $sl-color--dawn-pink;
}
2018-12-29 03:03:50 +01:00
to {
background-color: unset;
2018-12-29 02:59:53 +01:00
}
}
.signature {
a.anchor {
margin-left: -2.5rem;
}
.sl-c-callout--function:target & {
animation-name: highlight-signature;
animation-duration: 5s;
}
}
@keyframes highlight-signature {
from {
background-color: $sl-color--dawn-pink;
}
to {
background-color: <%= Rouge::Themes::Github.get_style(Rouge::Token::Tokens::Text)[:bg] %>;
}
}