Skip to content
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

Add a static scroll-margin-top to a footnote item #899

Merged
merged 3 commits into from
Jan 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/react/src/Footnotes/Footnotes.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
padding-inline-start: var(--base-size-12);
}

.FootnotesItem {
scroll-margin-top: 100px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

To your question:

Are you happy with the change, and the 100px value?

Should this be different across viewports? 100px on mobile is quite a lot of offset, should it be half of that?

Copy link
Contributor Author

@joshfarrant joshfarrant Jan 22, 2025

Choose a reason for hiding this comment

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

It could probably be reduced a bit, but I don't know if it necessarily needs to be responsive.

Our AnchorNav, for example, is 72px tall on all viewports and I'm not sure if we have any nav bars taller than that. We could bring the value down to 80px, but probably no lower than that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 sounds good, thanks

}

.FootnotesItem__citationIcon {
transform: scaleY(-1);
margin-inline-start: var(--base-size-4);
Expand Down
Loading