fix(web): clip Routes card overflow with overflow-hidden on card-body

Previous min-w-0 on the card grid item prevented the card from growing
but did not clip content that overflowed the card boundary (Chart.js
canvas, flex items with min-width:auto inside card-body). The overflow
was still visible beyond the card edge, causing page-level scroll.

Add overflow-hidden to card-body — this both resolves card-body's own
min-width:auto to 0 (per CSS spec, overflow != visible on a flex/grid
item zeroes its automatic minimum size) and clips any residual content
overflow from children. Add overflow-x-hidden to the page root as a
safety net for any non-card overflow.
This commit is contained in:
Louis King
2026-07-24 23:38:01 +01:00
parent 7d56090338
commit 3575af1f7e
@@ -546,7 +546,7 @@ function RouteCard({
data-testid="route-card"
data-route-label={`${route.from_label}${route.to_label}`}
>
<div className="card-body">
<div className="card-body overflow-hidden">
<div className="flex items-start justify-between gap-2">
<div className="flex-1 min-w-0">
<h2 className="card-title">
@@ -1500,7 +1500,7 @@ export function RoutesPage() {
}
return (
<div>
<div className="overflow-x-hidden">
<PageHeader title={t("entities.routes")} icon={IconPath} />
<SummaryStrip routes={routes} />