Repository navigation
Description
Describe the bug
/blog/ scrolls sideways at 320px. A single post title — Array.prototype.diff(meaCulpa), 30 characters with no spaces — sets a min-content width the grid column can't go below, so the whole column widens and every card in it overflows.
Two things combine:
src/components/blog/BlogList.astro:12—<ul class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">. There's no basegrid-cols-1, and grid items default tomin-width: auto, so a track can be forced wider than its share by one item's content.src/components/generic/SummaryCard.astro:28—<h3 class="poppins text-lg md:text-xl title-clamp">..title-clampsetsoverflow: hidden, which clips the title visually but doesn't reduce its intrinsic min-content width. There's nooverflow-wrap/word-break, so the long token still pushes the layout.
The overflow: hidden is why this is easy to miss — the page scrolls sideways but the title looks fine.
Steps to Reproduce
pnpm run build && pnpm run previewOpen /blog/ at a 320px viewport and compare document.documentElement.scrollWidth against clientWidth:
| Viewport | Page overflow | Widest elements |
|---|---|---|
| 320px | 27px (347 vs 320) | LI and div.brutal-card, 323px each |
| 375px | 0 | — |
Expected behavior
No horizontal scroll at 320px. A long unbroken title wraps or is clipped without widening its grid column.
Additional context
Found during an adversarial review of #51 and confirmed pre-existing, not caused by that PR. Proven by swapping BlogSummaryCard.astro back to origin/main (tags hidden on mobile, none of the new wrapping utilities), rebuilding, and re-measuring: identical 27px overflow, same single culprit card. Hiding the tags entirely doesn't fix it — it's title-driven, not tag-driven.
320px is the narrowest mainstream phone width (iPhone SE 1st gen, and Android split-screen). Worth deciding whether it's still in scope for this site before spending time here; nothing between 375px and 1280px is affected.
Likely fix is one line on each side: min-w-0 on the grid item (or grid-cols-[minmax(0,1fr)] on the ul), plus overflow-wrap: anywhere or break-words on .title-clamp. The grid half is the more general fix — it protects against any over-wide card content, not just this title. Worth re-checking /blog/tags/<tag>/ and the homepage recent-posts grid at the same time, since they render the same card.
Activity