fix(website): prevent playground page from overflowing the viewport - #11428
Open
timotheeguerin wants to merge 1 commit into
Open
fix(website): prevent playground page from overflowing the viewport#11428timotheeguerin wants to merge 1 commit into
timotheeguerin wants to merge 1 commit into
Conversation
Contributor
|
No changes needing a change description found. |
|
You can try these changes here
|
timotheeguerin
marked this pull request as ready for review
July 28, 2026 19:09
timotheeguerin
requested review from
catalinaperalta,
iscai-msft,
markcowl and
xirzec
as code owners
July 28, 2026 19:09
timotheeguerin
marked this pull request as draft
July 28, 2026 19:09
The playground container hard-coded its height as `calc(100vh - var(--header-height))`. Since microsoft#11292 made the header `position: sticky` (in flow) with a `min-height` navbar, the real rendered header is 54px while `--header-height` is 50px, so the page overflowed by ~4px and showed a vertical scrollbar. Make `.main` a flex column in the base layout and let the playground fill the remaining space via `flex: 1`, so it tracks the actual header height. Layout-neutral for other pages.
timotheeguerin
force-pushed
the
fix/playground-height
branch
from
July 28, 2026 19:16
5ce5076 to
11cd741
Compare
timotheeguerin
marked this pull request as ready for review
July 28, 2026 21:25
timotheeguerin
enabled auto-merge
July 28, 2026 21:25
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.
Problem
The
/playgroundpage overflows the viewport slightly, adding a vertical scrollbar.The container hard-coded its height as
calc(100vh - var(--header-height)).--header-heightis50px, but the header actually renders at 54px. Since #11292 changed the header fromposition: fixed(out of flow, overlaid) toposition: sticky(in flow) and switched the navbar tomin-heightand the body tomin-height: 100vh, that 4px difference now stacks:54px + (100vh - 50px) = 100vh + 4px→ a small vertical scroll.This is not related to header wrapping — the overflow is a constant 4px at every width.
Fix
Stop hard-coding the header offset. Make
.maina flex column in the base layout and let the playground fill the remaining space withflex: 1, so it always tracks the real rendered header height.Verification (Chromium / Playwright)
846px(=900 - 54), 0 vertical overflow at 1440px and 800px viewports (previously 4px)./community,/videos,/blog,/can-i-use/http, and/: rendered page height is identical with.mainas a flex column vs. block (diff = 0), so the layout change is neutral for existing pages.