Fix heading anchor scroll and wrapping (#35453)

* Fix heading anchor scroll and wrapping

* Increase scroll-margin-top to allow for more room after scroll

* Further adjustment

* Reduced again to prioritise 1 or 2 line heading whitespace on scroll
This commit is contained in:
Darren Griffin 2024-10-30 06:50:58 +00:00 committed by GitHub
parent 22fe1157da
commit 78840ee202
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1390,13 +1390,15 @@ a.my {
// Prevent headings from disappearing behind the site header when linked to
h1, h2, h3, h4, h5, h6 {
position: relative;
word-wrap: break-word;
}
:target {
display: block;
position: absolute;
position: relative;
top: -100px;
visibility: hidden;
scroll-margin-top: 80px;
}
.site-header {