hackertours-theme/assets/sass/components/anchor/_anchor.scss
2025-03-29 20:30:36 +01:00

37 lines
560 B
SCSS

// Anchor
//
// For heading anchor links. See render-heading.html.example.
.anchor,
%anchor {
--anchor-gap: .5rem;
--anchor-opacity: .4;
display: grid;
grid-template-columns: auto auto;
justify-content: start;
align-items: baseline;
gap: var(--anchor-gap);
a {
opacity: 0;
text-decoration: none;
width: fit-content;
}
&:has(:focus-visible),
&:hover {
a {
opacity: var(--anchor-opacity);
&:focus-visible,
&:hover {
opacity: 1;
}
}
}
p:has(+ &) {
margin-block-end: 0;
}
}