fix(client): remove place-items: center from body so app fills window width#1375
Open
aicayzer wants to merge 1 commit into
Open
fix(client): remove place-items: center from body so app fills window width#1375aicayzer wants to merge 1 commit into
aicayzer wants to merge 1 commit into
Conversation
… width The Vite/React template default `place-items: center` on <body> kept the app centered with empty side margins on wide windows. Drop the rule and add a Playwright regression covering both root-width and the computed body style. Fixes modelcontextprotocol#876.
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.
Summary
Closes #876.
The Vite/React template default
body { place-items: center; ... }shipped intoclient/src/index.csskeeps the app centered with visible blank margins on wide windows — see the before/after screenshots in #876. Removing the rule lets the React tree fill the viewport width as expected.Fix
client/src/index.css— dropplace-items: centerfrom thebodyrule. Keepmargin: 0,min-width: 320px,min-height: 100vh.client/e2e/full-window-width.spec.ts(new) — Playwright regression with two assertions:#root'sgetBoundingClientRect().widthis within 20px of the viewport width (scrollbar tolerance).getComputedStyle(document.body).placeItemsdoes not contain"center", so a future template paste-in can't silently reintroduce the bug.Test plan
npm run lintcleannpm test— 515 tests passingnpx playwright test full-window-width.spec.ts --project=chromium— 2 passedgit stash:body does not center its children via gridfails onplace-items: center, passes after removal — regression coverage works