fix: header support dropdown triggering layout shift with body scrollbar#21
Merged
RPDeshaies merged 3 commits intomainfrom Jul 4, 2025
Merged
Conversation
✅ Deploy Preview for keeper-farirpgs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull Request Overview
This PR addresses a layout shift caused by the body scrollbar toggling when opening the Support dropdown by moving scrollbar-related styles from the html element to body and introducing a stable gutter.
- Relocates
scroll-behavior: smoothandoverflow-yfromhtmltobody. - Adds
scrollbar-gutter: stableonbodyfor consistent scrollbar space. - Cleans up the now-empty
htmlrule.
Comments suppressed due to low confidence (1)
src/styles/global.css:58
- Consider adding a visual regression test or manual QA step to verify that the
scrollbar-gutter: stablesetting correctly prevents layout shifts across major browsers.
scrollbar-gutter: stable;
Comment on lines
51
to
+53
| html { | ||
| scroll-behavior: smooth; | ||
| overflow-y: scroll; | ||
| } | ||
|
|
There was a problem hiding this comment.
The html rule is now empty since its scroll-related properties were moved. You can remove this selector entirely to keep the stylesheet clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR fixes a layout shift happening when opening the Support dropdown menu in the header, which affected the body's scrollbar. The scrollbar styling was attached to the
htmlelement and not thebodyone.I also updated the style to use the
scrollbar-gutter: stableproperty to mimic Mac's scrollbar behavior on all browsers.