doc: add scroll margin to links

PR-URL: https://github.com/nodejs/node/pull/58982
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
This commit is contained in:
silverwind 2025-07-10 16:22:51 +02:00 committed by GitHub
parent b7db89f491
commit 2b75c2dc70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -373,6 +373,11 @@ p {
padding-bottom: 2rem; padding-bottom: 2rem;
} }
/* prevent the module-level sticky stability header from overlapping the section headers when clicked */
#apicontent:has(> .api_stability) a {
scroll-margin-top: 50px;
}
table { table {
border-collapse: collapse; border-collapse: collapse;
margin: 0 0 1.5rem; margin: 0 0 1.5rem;
@ -837,6 +842,9 @@ kbd {
.api_stability { .api_stability {
top: 0; top: 0;
} }
#apicontent a {
scroll-margin-top: 0;
}
} }
@media not screen, (max-height: 1000px) { @media not screen, (max-height: 1000px) {