Skip to content

Commit cb95e18

Browse files
silverwindtargos
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 85d6a28 commit cb95e18

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/api_assets/style.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,11 @@ p {
373373
padding-bottom: 2rem;
374374
}
375375

376+
/* prevent the module-level sticky stability header from overlapping the section headers when clicked */
377+
#apicontent:has(> .api_stability) a {
378+
scroll-margin-top: 50px;
379+
}
380+
376381
table {
377382
border-collapse: collapse;
378383
margin: 0 0 1.5rem;
@@ -837,6 +842,9 @@ kbd {
837842
.api_stability {
838843
top: 0;
839844
}
845+
#apicontent a {
846+
scroll-margin-top: 0;
847+
}
840848
}
841849

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

0 commit comments

Comments
 (0)