From 50a712c276958fec06dfdf3f70e636d21a79f8b6 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Sun, 6 Sep 2026 11:07:15 +0200 Subject: [PATCH] Allinea l'altezza di input, select e date nei form a un'unica misura. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit input[type="date"] resta più alto di un input di testo anche con appearance-none: h-10 esplicito su classiInput allinea tutti i campi. La textarea note usa h-auto per non perdere le due righe. Co-Authored-By: Claude Sonnet 5 --- src/components/crapp/ui-bits.tsx | 9 +++++++-- src/routes/eventi.tsx | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/crapp/ui-bits.tsx b/src/components/crapp/ui-bits.tsx index 5c449b9..fda8b50 100644 --- a/src/components/crapp/ui-bits.tsx +++ b/src/components/crapp/ui-bits.tsx @@ -156,9 +156,14 @@ export function SezioneTendina({ ); } -/** Classi condivise di input, select e textarea nei form dell'app. */ +/** + * Classi condivise di input, select e textarea nei form dell'app. `h-10`: + * `input[type="date"]` ha al suo interno segmenti e icona nativi che, anche + * con `appearance-none`, restano un filo più alti di un input di testo a + * parità di padding — un'altezza esplicita allinea tutti i campi tra loro. + */ export const classiInput = - "w-full min-w-0 rounded-xl border border-border bg-background px-3 py-2 text-sm"; + "h-10 w-full min-w-0 rounded-xl border border-border bg-background px-3 py-2 text-sm"; /** * Etichetta + controllo di un form. `min-w-0`: dentro `grid-cols-2` questa label diff --git a/src/routes/eventi.tsx b/src/routes/eventi.tsx index e48d2f2..1f6278f 100644 --- a/src/routes/eventi.tsx +++ b/src/routes/eventi.tsx @@ -180,7 +180,7 @@ function GestioneEventi() { maxLength={300} rows={2} onChange={(e) => aggiorna({ note: e.target.value })} - className={classiInput} + className={cn(classiInput, "h-auto")} />