From 78840ee202090e5ec27adbfcebc5bba08c88683b Mon Sep 17 00:00:00 2001 From: Darren Griffin Date: Wed, 30 Oct 2024 06:50:58 +0000 Subject: [PATCH] Fix heading anchor scroll and wrapping (#35453) * Fix heading anchor scroll and wrapping * Increase scroll-margin-top to allow for more room after scroll * Further adjustment * Reduced again to prioritise 1 or 2 line heading whitespace on scroll --- sass/homeassistant/_overrides.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sass/homeassistant/_overrides.scss b/sass/homeassistant/_overrides.scss index 186de47ee16..97c66c0c1c5 100644 --- a/sass/homeassistant/_overrides.scss +++ b/sass/homeassistant/_overrides.scss @@ -1390,13 +1390,15 @@ a.my { // Prevent headings from disappearing behind the site header when linked to h1, h2, h3, h4, h5, h6 { position: relative; + word-wrap: break-word; } :target { display: block; - position: absolute; + position: relative; top: -100px; visibility: hidden; + scroll-margin-top: 80px; } .site-header {