Skip to content

Commit 292dabf

Browse files
committed
doc: move #target a 2em from top of viewport.
Make sure there is a little space between top of viewport and the element selected with a #fragment. This looks cleaner.
1 parent bdabfd0 commit 292dabf

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

doc/_static/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,3 +512,7 @@ aside.footnote > span + p { margin-block-start: unset; }
512512
}
513513
*/
514514

515+
/* move the target off the top of the viewport by a little */
516+
:target {
517+
scroll-margin-block-start: 2em;
518+
}

website/www/_static/style.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,11 @@ aside.footnote > span + p { margin-block-start: unset; }
512512
}
513513
*/
514514

515+
/* move the target off the top of the viewport by a little */
516+
:target {
517+
scroll-margin-block-start: 2em;
518+
}
519+
515520
/* website only */
516521
/* assume desktop reader for local html files, also no contact
517522
page for local doc files */

0 commit comments

Comments
 (0)