From 9747e6fa3afd10f7e9487cc8ea6ebd98236138f1 Mon Sep 17 00:00:00 2001 From: Florent Tapponnier Date: Mon, 1 Jun 2026 07:06:31 +0200 Subject: [PATCH] fix: mobile overflow on benchmark detail pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Tables (ledger, region-grid): min-w only applies from sm: so mobile shrinks the table inside its overflow-x-auto wrapper instead of forcing 480/520px and pushing the whole page past the viewport edge - count-leaderboard summary strip stacks 1-col on mobile, reduces gap-x so 'RANGE 40 → 306 7 providers' no longer cuts off - summary-stat removes the 8rem min-width on mobile flex children - breadcrumb + bench identifier lower tracking on mobile, last crumb truncates at 60vw so long titles can't push the row off-screen - Title + subtitle get break-words as safety net - html { overflow-x: clip } as a final root-level safety net --- src/app/benchmarks/[slug]/page.tsx | 14 ++++++++------ src/app/globals.css | 6 ++++++ src/components/count-leaderboard.tsx | 8 ++++---- src/components/ledger-table.tsx | 2 +- src/components/region-grid.tsx | 2 +- src/components/summary-stat.tsx | 2 +- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/app/benchmarks/[slug]/page.tsx b/src/app/benchmarks/[slug]/page.tsx index 559b2ab3..ed36aac1 100644 --- a/src/app/benchmarks/[slug]/page.tsx +++ b/src/app/benchmarks/[slug]/page.tsx @@ -315,9 +315,9 @@ export default async function BenchmarkPage({ so Google can show the crumb above the URL in the SERP. */} @@ -356,7 +358,7 @@ export default async function BenchmarkPage({ {/* Bench identifier - minimal mono line, no SaaS-style pills. */} -
+
{benchmark.category} @@ -373,10 +375,10 @@ export default async function BenchmarkPage({
{/* Title */} -

+

{benchmark.title}

-

+

{benchmark.subtitle}

diff --git a/src/app/globals.css b/src/app/globals.css index f08005bb..50114e34 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -327,4 +327,10 @@ textarea:focus-visible { html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; + /* Safety net: clip any rogue horizontal overflow at the root so a + single wide child (e.g. a min-w table) can never push the whole + page off-screen on mobile. Per-component fixes still target the + intrinsic min-widths so the clip rarely fires. `clip` (not hidden) + avoids creating a scroll container that breaks position: sticky. */ + overflow-x: clip; } diff --git a/src/components/count-leaderboard.tsx b/src/components/count-leaderboard.tsx index d437a7e5..8d36d0ac 100644 --- a/src/components/count-leaderboard.tsx +++ b/src/components/count-leaderboard.tsx @@ -49,7 +49,7 @@ export function CountLeaderboard({
)} {/* Thin summary strip. matches the latency-bench layout. */} -
+
-
+
+
{label}
-
+
{value} {hint ? ( {hint} diff --git a/src/components/ledger-table.tsx b/src/components/ledger-table.tsx index 2803636c..5ee3a429 100644 --- a/src/components/ledger-table.tsx +++ b/src/components/ledger-table.tsx @@ -56,7 +56,7 @@ export function LedgerTable({ benchmark }: Props) { return (
- +
diff --git a/src/components/region-grid.tsx b/src/components/region-grid.tsx index 1d8c70be..73c8ea00 100644 --- a/src/components/region-grid.tsx +++ b/src/components/region-grid.tsx @@ -38,7 +38,7 @@ export function RegionGrid({ benchmark }: Props) { return (
- +
diff --git a/src/components/summary-stat.tsx b/src/components/summary-stat.tsx index 073d845a..36a1d554 100644 --- a/src/components/summary-stat.tsx +++ b/src/components/summary-stat.tsx @@ -24,7 +24,7 @@ export function SummaryStat({ hint?: string; }) { return ( -
+
{label}
Product