Repository navigation
fix(site): stop the Get started code pane widening the page on phones - #35
Merged
Merged
Conversation
Signed-off-by: Julio Jimenez <julio@julioj.com>
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.
What / why
Below ~700px the landing page scrolled horizontally. The outermost offender was the Get started code pane: it is a flex item of the click-ui
Panel(column,align-items: center), and a flex item's defaultmin-width: autolets thewhite-space: precode force it to its content width (686px), which widened the whole document regardless of viewport..get-started-panel .codewrapnow haswidth: 100%; min-width: 0alongside the existing 860px cap, so the pane shrinks with the panel and the CodeBlock's ownoverflow-x: autoscrolls the longcurllines internally. Desktop is unchanged (862px pane, centered).Measured in headless Chrome on the production build: document width equals the viewport at 375, 414 and 700px (was 743px at all three). At 320px the page is still 360px wide because of the header's "Get started" button; that is a separate header-layout issue and is not touched here.
Checklist
make testandmake smokepasssite/updated if behavior or docs changed (samples insite/src/samples.tsstay verbatim)🤖 Generated with Claude Code