Skip to content

fix(docs-infra): reserve scrollbar gutter for mobile nav#69154

Merged
atscott merged 1 commit into
angular:mainfrom
KirtiRamchandani:fix/docs-scrollbar-gutter
Jun 4, 2026
Merged

fix(docs-infra): reserve scrollbar gutter for mobile nav#69154
atscott merged 1 commit into
angular:mainfrom
KirtiRamchandani:fix/docs-scrollbar-gutter

Conversation

@KirtiRamchandani
Copy link
Copy Markdown
Contributor

Problem

Opening the mobile navigation hides vertical scrolling on body, which can remove the classic scrollbar gutter on Safari/desktop setups and change the viewport width mid-animation.

Root cause

The docs shell already uses body as the scroll container. When the nav opens, document.body.style.overflowY = 'hidden' removes the scrollbar, so media queries around the breakpoint can see a different width.

Solution

Reserve the scrollbar gutter on the existing body scroll container with scrollbar-gutter: stable, avoiding a larger scroll-root change while keeping the current scroll-lock behavior.

Fixes #69036.

Tests

  • corepack pnpm exec prettier --check adev/shared-docs/styles/_resets.scss
  • npx --yes sass@1.94.2 --no-source-map --load-path node_modules adev/shared-docs/styles/_resets.scss $env:TEMP\angular-resets.css
  • git diff --check

@pullapprove pullapprove Bot requested a review from MarkTechson June 4, 2026 14:38
@angular-robot angular-robot Bot added the area: docs-infra Angular.dev application and infrastructure label Jun 4, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jun 4, 2026
@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Jun 4, 2026
@JeanMeche JeanMeche removed the request for review from MarkTechson June 4, 2026 14:44
@atscott atscott merged commit bcb9f8d into angular:main Jun 4, 2026
19 checks passed
@atscott
Copy link
Copy Markdown
Contributor

atscott commented Jun 4, 2026

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: docs-infra Angular.dev application and infrastructure target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scroll root on body causes 8 px gutter flicker (safari)

3 participants