From 8a24f02782b7f2454ef67d6ece0b62b808175a21 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 27 Feb 2023 10:30:12 -0400 Subject: smooth hash link scrolling & anchor scroll offset --- src/static/site3.css | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/static/site3.css') diff --git a/src/static/site3.css b/src/static/site3.css index cc853b65..22a92f84 100644 --- a/src/static/site3.css +++ b/src/static/site3.css @@ -1140,6 +1140,16 @@ html[data-url-key="localized.home"] .carousel-container { /* Sticky heading */ +#content [id] { + /* Adjust scroll margin. */ + scroll-margin-top: calc( + 74px /* Sticky heading */ + + 33px /* Sticky subheading */ + - 1em /* One line of text (align bottom) */ + - 4px /* Padding for hanging letters */ + ); +} + .content-sticky-heading-container { position: sticky; top: 0; -- cgit 1.3.0-6-gf8a5