Skip to content

Reserve the scrollbar gutter so the header stops shifting when search opens - #3364

Draft
enf0rc3 wants to merge 4 commits into
mainfrom
wl/search-scrollbar-gutter
Draft

Reserve the scrollbar gutter so the header stops shifting when search opens#3364
enf0rc3 wants to merge 4 commits into
mainfrom
wl/search-scrollbar-gutter

Conversation

@enf0rc3

@enf0rc3 enf0rc3 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Focusing the search hides the body overflow to lock scrolling. That takes the scrollbar with it and widens the viewport, so both fixed headers grew and their contents jumped 15px to the right.

scrollbar-gutter: stable on html holds that width open, so the viewport stays a constant width whenever anything locks scrolling.

Measured on /docs/: the old header and the new TopNav both shifted 14.86px before, 0px after. No change while the search is closed. scrollbar.js now measures a 0px delta, so its own compensation becomes a no-op.

🤖 Generated with Claude Code

enf0rc3 and others added 2 commits August 14, 2026 15:47
Focusing the search hides the body overflow, which removes the scrollbar and
widens the viewport. The header is fixed, so it grew with the viewport and its
contents moved 15px to the right. Measure the scrollbar width at lock time and
hold that space open on the body and the header until unlock.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Reverts the search-specific compensation in favour of scrollbar-gutter: stable
on html. The viewport then keeps a constant width whenever a scroll lock hides
the body overflow, so the fixed header stays put for search, the mobile nav and
anything added later.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@team-marketing-branch-protections

Copy link
Copy Markdown

Pull request environment is available at https://stoctodocspr3364.z22.web.core.windows.net.

You can view the ephemeral environment status in Octopus Deploy.

This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity.

enf0rc3 and others added 2 commits August 14, 2026 16:26
The overlay is fixed, so it stops at the reserved gutter. Once the scrollbar
goes that strip kept the undimmed page colour, showing as a pale bar down the
right edge in light mode. Painting the same wash onto the canvas covers it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants