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.
What is the purpose of this pull request?
Overview of changes:
#2217
Changed the property value of
overflow-y
of the.nav-component
toscroll
to allocate space to the scrollbar as discussed here so that its appearance and disappearance doesn't cause the icon in the nav bar to shift.Since this change is to
.nav-component
, both the sitenav and pagenav is affected.Since the change is to the
main.css
file of the default template, all the othermain.css
files also have to be updated. Currently there isn't a way to automatically update the file after a MarkBind upgrade (#1961), so if this change is accepted, there has to be release note for current users to update theirmain.css
file.Anything you'd like to highlight/discuss:
overflow-y: overlay
is a legacy value alias foroverflow-y: auto
according to the mdn docs here, which unfortunately still causes the moving of the content from what I can see.The overlay value of the overflow CSS property overall is being deprecated and standardised as the scrollbar-gutter property, but I see that its not really supported on Safari browser. If anyone wants me to look into using this property instead, or any other alternatives, I'll be happy to try it out.
Previous behaviour:
Screen.Recording.2024-04-03.at.12.56.40.AM.mov
Current behaviour:
Screen.Recording.2024-04-03.at.12.57.56.AM.mov
Testing instructions:
Serve the docs using
markbind serve -d
, collapse all sections of the siteNav, open the sections one by one until the scrollbar appears. Ensure that when the scrollbar appears, the icons doesnt shift.Proposed commit message: (wrap lines at 72 characters)
Allocate space for scrollbar in nav components
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major
,r.Minor
,r.Patch
.Breaking change release note preparation (if applicable):