-
Notifications
You must be signed in to change notification settings - Fork 38
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
Conversation
🦋 Changeset detectedLatest commit: 7e34303 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🟢 No design token changes found |
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
@@ -20,6 +20,10 @@ | |||
padding-inline-start: var(--base-size-12); | |||
} | |||
|
|||
.FootnotesItem { | |||
scroll-margin-top: 100px; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 sounds good, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
Forgot to mention @joshfarrant, could you please add a changeset to this PR |
Ah, great spot, thanks @rezrah Changeset added, and margin reduced to 80px too |
Summary
Added a static
scroll-margin-top
toFootnote.Item
. This allows a small (100px) amount of space to be present between the top of the viewport and theFootnote.Item
when it is navigated to.What should reviewers focus on?
Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
update snapshots
label to the PR)Reviewer checklist:
Screenshots:
footnotes.mp4