From a100f8899340a31d0192340bf5758933e05fbdc3 Mon Sep 17 00:00:00 2001 From: Alija Sabic Date: Tue, 14 Mar 2023 00:01:21 +0100 Subject: [PATCH] Revert "Update theme-default style for accessible header-anchors" This reverts commit 7b941cd1b04ea32f86e42d0035f0090ddf824018. --- .../styles/components/vp-doc.css | 56 +++++++------------ 1 file changed, 19 insertions(+), 37 deletions(-) diff --git a/src/client/theme-default/styles/components/vp-doc.css b/src/client/theme-default/styles/components/vp-doc.css index 2b42bbb7..11d8bb00 100644 --- a/src/client/theme-default/styles/components/vp-doc.css +++ b/src/client/theme-default/styles/components/vp-doc.css @@ -2,7 +2,12 @@ * Headings * -------------------------------------------------------------------------- */ -.vp-doc .header-wrapper { +.vp-doc h1, +.vp-doc h2, +.vp-doc h3, +.vp-doc h4, +.vp-doc h5, +.vp-doc h6 { position: relative; font-weight: 600; outline: none; @@ -31,8 +36,7 @@ } .vp-doc .header-anchor { - position: absolute; - top: 0; + float: left; margin-left: -0.87em; padding-right: 0.23em; font-weight: 500; @@ -41,40 +45,18 @@ transition: color 0.25s, opacity 0.25s; } -.vp-doc h1 + .header-anchor { - line-height: 40px; - font-size: 32px; -} - -.vp-doc h2 + .header-anchor { - padding-top: 25px; - line-height: 32px; - font-size: 24px; -} - -.vp-doc h3 + .header-anchor { - line-height: 28px; - font-size: 20px; -} - -.vp-doc h1:hover + .header-anchor, -.vp-doc h1 + .header-anchor:focus, -.vp-doc h1 + .header-anchor:hover, -.vp-doc h2:hover + .header-anchor, -.vp-doc h2 + .header-anchor:focus, -.vp-doc h2 + .header-anchor:hover, -.vp-doc h3:hover + .header-anchor, -.vp-doc h3 + .header-anchor:focus, -.vp-doc h3 + .header-anchor:hover, -.vp-doc h4:hover + .header-anchor, -.vp-doc h4 + .header-anchor:focus, -.vp-doc h4 + .header-anchor:hover, -.vp-doc h5:hover + .header-anchor, -.vp-doc h5 + .header-anchor:focus, -.vp-doc h5 + .header-anchor:hover, -.vp-doc h6:hover + .header-anchor, -.vp-doc h6 + .header-anchor:focus, -.vp-doc h6 + .header-anchor:hover { +.vp-doc h1:hover .header-anchor, +.vp-doc h1 .header-anchor:focus, +.vp-doc h2:hover .header-anchor, +.vp-doc h2 .header-anchor:focus, +.vp-doc h3:hover .header-anchor, +.vp-doc h3 .header-anchor:focus, +.vp-doc h4:hover .header-anchor, +.vp-doc h4 .header-anchor:focus, +.vp-doc h5:hover .header-anchor, +.vp-doc h5 .header-anchor:focus, +.vp-doc h6:hover .header-anchor, +.vp-doc h6 .header-anchor:focus { opacity: 1; }