From 8499cfeaad620726e331a65169565cbddc925f5c Mon Sep 17 00:00:00 2001 From: Robin Whittleton Date: Sat, 1 Oct 2022 09:50:13 +0200 Subject: [PATCH] Make sure that headers scrolled in view on mobile Currently, when clicking on a ToC link in a single page web version, the title for that section is hidden under the fixed banner. We can use `scroll-margin-top` to add a little additional scroll amount to scroll the header into view. `3em` matches the current top margin of `3em` on headings and hgroups. --- www/css/web.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/www/css/web.css b/www/css/web.css index 5a512e5f..670aca0d 100644 --- a/www/css/web.css +++ b/www/css/web.css @@ -123,4 +123,8 @@ and will just drop this entire query together if it's included. */ margin-bottom: 2em; margin-top: 2em; } + + [id]{ + scroll-margin-top: 3em; + } }