From 99ae9e8c0d770bae148ddd7fd8532dba91156740 Mon Sep 17 00:00:00 2001 From: Ihor Sychevskyi Date: Thu, 30 Jan 2025 00:05:38 +0200 Subject: [PATCH] update hash (#221) --- src/styles/headings.css | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/styles/headings.css b/src/styles/headings.css index 02aaa6b..ed9ccc7 100644 --- a/src/styles/headings.css +++ b/src/styles/headings.css @@ -1,9 +1,34 @@ -/* Style the Markdown heading links. */ .sl-markdown-content :is(h1, h2, h3, h4, h5, h6) > a { color: var(--sl-color-white); text-decoration: none; + position: relative; &:hover { - text-decoration: underline; + &:before, + &:after { + opacity: 1; + } + } + + &:before { + content: "#"; + opacity: 0; + position: absolute; + left: -2rem; + padding-right: 2rem; + } + + @media screen and (max-width: 1475px) { + &:before { + display: none; + } + + &:after { + content: "#"; + opacity: 0; + position: absolute; + padding-left: 2rem; + right: -2rem; + } } } \ No newline at end of file