From 1dc482b00d1c3f5fa37c5874c19077dd92d5f44d Mon Sep 17 00:00:00 2001 From: Matthew Woodcraft Date: Sat, 26 Oct 2019 12:54:41 +0100 Subject: [PATCH] Add scroll-margin-top to headings which contain link targets. This means when the link is followed, the page scrolls in such a way as to leave space for the fixed menu bar. Fixes #1040 --- src/theme/css/general.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/theme/css/general.css b/src/theme/css/general.css index 44c117d6..e1e671e9 100644 --- a/src/theme/css/general.css +++ b/src/theme/css/general.css @@ -45,6 +45,13 @@ h4 a.header:target::before { width: 30px; } +h1 a.header:target, +h2 a.header:target, +h3 a.header:target, +h4 a.header:target { + scroll-margin-top: 62px; +} + .page { outline: 0; padding: 0 var(--page-padding);