From 0465a985dc5262fa2043540f4eddafa251f917a3 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 20 Sep 2023 04:27:32 +0800 Subject: [PATCH] fix(posts): resume target highlighting for superscripts and footnotes (#1253) `` and `` are highlighted when in `:target` state, but this feature has been missing since `v6.1.0` due to an oversight in development. --- _sass/addon/commons.scss | 7 ++++++- _sass/addon/module.scss | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index 279d45a..d405d6c 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -273,6 +273,8 @@ i { margin-bottom: 0.3rem; } + @extend %sup-fn-target; + > p { margin-left: 0.25em; margin-top: 0; @@ -287,10 +289,13 @@ i { @include pl-pr(2px); border-bottom-style: none !important; - transition: background-color 1.5s ease-in-out; } } +sup { + @extend %sup-fn-target; +} + .reversefootnote { @at-root a#{&} { font-size: 0.6rem; diff --git a/_sass/addon/module.scss b/_sass/addon/module.scss index 8e16050..9119b3d 100644 --- a/_sass/addon/module.scss +++ b/_sass/addon/module.scss @@ -127,6 +127,16 @@ font-weight: 600; } +%sup-fn-target { + &:target { + background-color: var(--footnote-target-bg); + width: -moz-fit-content; + width: -webkit-fit-content; + width: fit-content; + transition: background-color 1.75s ease-in-out; + } +} + /* ---------- scss mixin --------- */ @mixin mt-mb($value) {