Skip to content

add scroll-margin-top for navbar to footnote links #1088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025

Conversation

JostMigenda
Copy link
Contributor

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.)

Copy link
Member

@martin-henz martin-henz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@RichDom2185 RichDom2185 merged commit 4eefa2d into source-academy:master Apr 11, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants