Skip to content

Commit 1dc482b

Browse files
committed
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
1 parent 21d8f39 commit 1dc482b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/theme/css/general.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ h4 a.header:target::before {
4545
width: 30px;
4646
}
4747

48+
h1 a.header:target,
49+
h2 a.header:target,
50+
h3 a.header:target,
51+
h4 a.header:target {
52+
scroll-margin-top: 62px;
53+
}
54+
4855
.page {
4956
outline: 0;
5057
padding: 0 var(--page-padding);

0 commit comments

Comments
 (0)