Skip to content

fix(site): stop horizontal overflow on mobile#105

Merged
uptonm merged 1 commit into
mainfrom
fix/mobile-horizontal-overflow
Jul 19, 2026
Merged

fix(site): stop horizontal overflow on mobile#105
uptonm merged 1 commit into
mainfrom
fix/mobile-horizontal-overflow

Conversation

@uptonm

@uptonm uptonm commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Problem

The marketing site scrolled horizontally on mobile — at a 390px viewport the page scrollWidth was 498px (108px of overflow), and the hero content was laid out wider than the screen and clipped on the right.

Root cause

Grid items default to min-width: auto, so they won't shrink below their content's min-content width. The hero columns and the Install step cards (<li>) each contain a CopyCommand whose command string is whitespace-nowrap. Even though the button clips (overflow-hidden) and the inner <code> scrolls (overflow-x-auto min-w-0), the grid item grew to the command's ~440px intrinsic width — overflowing the viewport (Install section → page scroll) and clipping the hero on the right.

The decorative hero blurs are not the cause — the hero <section> is overflow-hidden and clips them (rectR=390).

Fix

Add min-w-0 to the three grid items (both hero columns + the Install <li>) so they can shrink to the container and let the inner code scroll instead of forcing width.

Verification

  • Headless browser at 320 / 390 / 414px: scrollWidth === clientWidth, zero unclipped overflow elements.
  • biome check, tsc --noEmit, next build all pass.

🤖 Generated with Claude Code

Grid items default to min-width:auto, so they refuse to shrink below their
content's min-content width. The hero columns and the Install step cards each
hold a CopyCommand whose command string is whitespace-nowrap; even though the
button clips and its inner code scrolls, the grid item grew to the command's
~440px intrinsic width — overflowing the viewport (body scrollWidth 498 at
390px) and clipping the hero on the right. Add min-w-0 to those grid items so
they shrink and let the inner code scroll instead. Verified no overflow at
320/390/414px.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
home Ready Ready Preview, Comment Jul 19, 2026 3:51am

Request Review

@uptonm
uptonm merged commit 1f85e1b into main Jul 19, 2026
3 checks passed
@uptonm
uptonm deleted the fix/mobile-horizontal-overflow branch July 19, 2026 03:55
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.

1 participant