Skip to content

Commit cde1859

Browse files
Sbussisoclaude
andcommitted
fix(mobile): MCP showcase columns busted out of grid by ~30 px
The .landing-mcp-showcase grid switches to a single column at ≤768 px, but each grid item still rendered ~370 px wide on a 342 px parent — a classic CSS Grid `min-width: auto` issue, where grid items refuse to shrink below their intrinsic content width. The right column embeds a fake terminal with a `<pre>`-formatted code sample whose lines are longer than the viewport, dragging the column past the container edge and producing the residual 5 px horizontal scroll on the landing page. min-width: 0 on both columns lets the grid item shrink to fit; the inner `<pre>` already has overflow-x: auto so it h-scrolls within its own box, which is the correct behavior for a code sample. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 62da208 commit cde1859

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

frontend/src/styles/landing.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,6 +2186,18 @@
21862186
grid-template-columns: 1fr;
21872187
gap: 2rem;
21882188
}
2189+
2190+
/* Grid items default to min-width: auto, which is the intrinsic size of
2191+
their content. The .landing-mcp-right column embeds a fake terminal
2192+
code block with `white-space: pre` lines longer than the viewport;
2193+
without min-width: 0 the grid item refuses to shrink below content
2194+
width and pushes 5–30 px past the container edge. min-width: 0 lets
2195+
the column shrink to fit; the inner pre still h-scrolls inside its
2196+
own box, which is the correct behavior for a code sample. */
2197+
.landing-mcp-left,
2198+
.landing-mcp-right {
2199+
min-width: 0;
2200+
}
21892201
}
21902202

21912203
/* ── Privacy section ──────────────────────────────────────────────

0 commit comments

Comments
 (0)