From 8b0c37ffc80fb9c45a335337dec1486cd9d45a3f Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 3 May 2023 02:32:37 +0200 Subject: [PATCH] fix header applying anchor css only on anchor --- static/css/blog/post.css | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/static/css/blog/post.css b/static/css/blog/post.css index 76eada7..0777a97 100644 --- a/static/css/blog/post.css +++ b/static/css/blog/post.css @@ -104,33 +104,23 @@ p { } /* Anchors */ -h1:hover > a::before, -h2:hover > a::before, -h3:hover > a::before, -h4:hover > a::before, -h5:hover > a::before, -h6:hover > a::before { +h1:hover > a.anchor::before, +h2:hover > a.anchor::before, +h3:hover > a.anchor::before, +h4:hover > a.anchor::before, +h5:hover > a.anchor::before, +h6:hover > a.anchor::before { visibility: visible; color: var(--font-color); } -h1 > a::before, -h2 > a::before, -h3 > a::before, -h4 > a::before, -h5 > a::before, -h6 > a::before { +a.anchor::before { content: "#"; visibility: hidden; padding-right: 0.1em; } -h1 > a, -h2 > a, -h3 > a, -h4 > a, -h5 > a, -h6 > a { +a.anchor { text-decoration: none; }