Show heading anchor on touch devices

This commit is contained in:
Cotes Chung 2021-12-09 20:45:20 +08:00
parent df81012e28
commit d919f833f1
2 changed files with 15 additions and 10 deletions

View File

@ -62,7 +62,7 @@ h2 {
h3 { h3 {
@extend %heading; @extend %heading;
@extend %section; @extend %section;
@extend %anchor-relative; @extend %anchor;
font-size: 1.2rem; font-size: 1.2rem;
} }

View File

@ -19,10 +19,14 @@
%anchor { %anchor {
> a { > a {
font-size: 70%; font-size: 1rem;
visibility: hidden;
margin-left: 0.5rem; margin-left: 0.5rem;
}
@media (hover: hover) {
> a {
border-bottom: none !important; border-bottom: none !important;
visibility: hidden;
opacity: 0; opacity: 0;
transition: opacity 0.25s ease-in, visibility 0s ease-in 0.25s; transition: opacity 0.25s ease-in, visibility 0s ease-in 0.25s;
} }
@ -34,6 +38,7 @@
transition: opacity 0.25s ease-in, visibility 0s ease-in 0s; transition: opacity 0.25s ease-in, visibility 0s ease-in 0s;
} }
} }
}
} }
%anchor-relative { %anchor-relative {