🐛 Fix(render-heading): prevent colour flicker on anchor links

The group-hover prefix is redundant and cause the colour to flicker
for the anchor link tag - the colour should actually stay the same
and only have it's opacity (visibility really) controlled via group-hover.
This commit is contained in:
Mike Repec
2025-10-13 09:18:45 +02:00
parent 908c988d06
commit b4a13da6d8
+1 -1
View File
@@ -4,7 +4,7 @@
{{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }} {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}
<span <span
class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"> class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
<a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#{{ $anchor }}" aria-label="{{ i18n "article.anchor_label" }}">#</a> <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#{{ $anchor }}" aria-label="{{ i18n "article.anchor_label" }}">#</a>
</span> </span>
{{ end }} {{ end }}
</h{{ .Level }}> </h{{ .Level }}>