add scroll-margin-top for navbar to footnote links #1088
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A small UX improvement: When clicking on a footnote link, the link target is usually aligned with the top edge of the browser viewport. Due to the navbar overlay at the top, this means the link target may be invisible (hidden behind the navbar), which is confusing.
This PR adds a
scroll-margin-top
to the CSS, to ensure the link target is positioned just below the navbar, where the reader would expect it.(This is most often relevant when jumping back to the main text; but on pages with many long footnotes (e.g. chapter 2.3.1), it can also be an issue when jumping to the footnote text. This PR adds the margin for both cases.)