Files
accounted/components
Mattsson 84e6b1eb17 fix(ui): cap DialogContent grid track so nowrap children cannot widen modals (#1962)
DialogContent is display:grid with an implicit auto column, and the auto
track sizes to the widest child's min-content. Chrome counts nowrap text
(truncate, whitespace-nowrap) at its full width in that calculation even
though it truncates at layout time, so one long description (e.g. a
candidate row in MatchVerifikationPicker) widened the track past the
dialog, stretched every sibling, and clipped the right edge behind a
horizontal scrollbar. grid-cols-[minmax(0,1fr)] caps the track at the
content box, hardening every modal at once; callers can still override
via className (tailwind-merge resolves the conflict in their favor).

Verified with a headless-Chrome replica of the reported dialog:
scrollWidth 696 vs clientWidth 510 before, 510/510 after.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-26 21:14:06 +02:00
..