fix(posts): resume target highlighting for superscripts and footnotes (#1253)

`<sup>` and `<footnote>` are highlighted when in `:target` state, but this feature has been missing since `v6.1.0` due to an oversight in development.
This commit is contained in:
Cotes Chung 2023-09-20 04:27:32 +08:00 committed by GitHub
parent 73e171b0fb
commit 0465a985dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -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;

View file

@ -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) {