Converting from sass to nested vanilla css with layers (#147)
This commit is contained in:
parent
8e611f3a64
commit
57244c3f33
1 changed files with 2687 additions and 2751 deletions
36
assets/css/components/_anchor.css
Normal file
36
assets/css/components/_anchor.css
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* Anchor */
|
||||
|
||||
@layer components {
|
||||
.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(+ .anchor) {
|
||||
margin-block-end: 0;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue