Skip to content

Commit c134103

Browse files
silverwindmarco-ippolito
authored andcommitted
doc: add scroll margin to links
PR-URL: #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>
1 parent 516fc9f commit c134103

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/api_assets/style.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,11 @@ p {
369369
padding-bottom: 2rem;
370370
}
371371

372+
/* prevent the module-level sticky stability header from overlapping the section headers when clicked */
373+
#apicontent:has(> .api_stability) a {
374+
scroll-margin-top: 50px;
375+
}
376+
372377
table {
373378
border-collapse: collapse;
374379
margin: 0 0 1.5rem;
@@ -830,6 +835,12 @@ kbd {
830835
position: relative;
831836
top: 0;
832837
}
838+
.api_stability {
839+
top: 0;
840+
}
841+
#apicontent a {
842+
scroll-margin-top: 0;
843+
}
833844
}
834845

835846
@media not screen, (max-height: 1000px) {

0 commit comments

Comments
 (0)