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
This commit is contained in:
Matthew Woodcraft 2019-10-26 12:54:41 +01:00
parent 21d8f394ae
commit 1dc482b00d
1 changed files with 7 additions and 0 deletions

View File

@ -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);