From 85ba89905956b17c873f6416e10a0aebff5ce4b0 Mon Sep 17 00:00:00 2001 From: Lucas Winther Date: Wed, 2 Sep 2026 22:58:33 +0200 Subject: [PATCH] fix(dialog): let the dialog's own padding decide its layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DialogContent is a grid whose single implicit column is `auto`, so it sized to the widest child's min-content — and one row of the split editor (a select, an amount, a unit, a radio and a remove button) has a min-content width of 480px against the 464px the padding leaves. The column grew past the padding box and every stretched child grew with it, so measured, every field in the purchase dialog sat 6.6px from the right edge and 25px from the left. One crowded row was setting the padding for the whole dialog. `grid-cols-[minmax(0,1fr)]` lets the column shrink to the space actually available, which puts the element's own `p-6` back in charge. Co-Authored-By: Claude Opus 5 (1M context) --- src/components/ui/dialog.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx index 84bdef4..15b226d 100644 --- a/src/components/ui/dialog.tsx +++ b/src/components/ui/dialog.tsx @@ -61,7 +61,17 @@ function DialogContent({