Template
Anchor link/styles.css
From Dogcraft Wiki
mNo edit summary |
m (Update for lists) |
||
Line 8: | Line 8: | ||
opacity: 0; | opacity: 0; | ||
transition: color .25s,opacity .25s; | transition: color .25s,opacity .25s; | ||
} | |||
/* the margin needs to be greater inside lists so it doesn't collide with the list marker */ | |||
ul a > span.anchor-visible::after { | |||
margin-left: calc(-3ch - .1ch); | |||
} | } | ||
Revision as of 21:32, 27 July 2024
a > span.anchor-visible::after {
content: '#';
float: left;
margin-left: calc(-1ch - .1ch);
padding-right: .1ch;
-webkit-user-select: none;
user-select: none;
opacity: 0;
transition: color .25s,opacity .25s;
}
/* the margin needs to be greater inside lists so it doesn't collide with the list marker */
ul a > span.anchor-visible::after {
margin-left: calc(-3ch - .1ch);
}
:hover > a > span.anchor-visible::after,
a:focus > span.anchor-visible::after {
opacity: 1;
}
/* templatestyles appears to lack :has() support at the moment
a:has(> span.anchor-visible) {
float:left;
}*/
This page was last modified on 27 July 2024, at 21:32. (3 months ago)