diff options
author | XhmikosR <xhmikosr@gmail.com> | 2022-02-19 16:16:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-19 16:16:23 +0300 |
commit | ae12d645ef0225831e59248c45689042ebdb83d2 (patch) | |
tree | d875ad4a993a9fc74d6f01bb0cb71c7f122185f1 /site/assets/scss | |
parent | 407af8ac7f9296627aebc1e4c5d0ee948f8be1f3 (diff) |
Replace AnchorJS with a Hugo render hook (#32953)
* Replace AnchorJS with a Hugo render hook
* docs(anchors): improve aria-label on anchor links
* docs(anchors): show anchor link when ed
* docs(anchors): add hash in pseudo-element
Co-authored-by: Gaƫl Poupard <ffoodd@users.noreply.github.com>
Diffstat (limited to 'site/assets/scss')
-rw-r--r-- | site/assets/scss/_anchor.scss | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/site/assets/scss/_anchor.scss b/site/assets/scss/_anchor.scss index 96a7dbf9c7..5bb39150b1 100644 --- a/site/assets/scss/_anchor.scss +++ b/site/assets/scss/_anchor.scss @@ -1,11 +1,21 @@ -.anchorjs-link { +.anchor-link { + padding: 0 .175rem; font-weight: 400; color: rgba($link-color, .5); - @include transition(color .15s ease-in-out); + text-decoration: none; + opacity: 0; + @include transition(color .15s ease-in-out, opacity .15s ease-in-out); + + &::after { + content: "#"; + } &:focus, - &:hover { + &:hover, + :hover > &, + :target > & { color: $link-color; text-decoration: none; + opacity: 1; } } |