diff --git a/src/components/ui/native-select.tsx b/src/components/ui/native-select.tsx index 3c8b23580..9f7fc3fdf 100644 --- a/src/components/ui/native-select.tsx +++ b/src/components/ui/native-select.tsx @@ -37,20 +37,40 @@ import { cn } from "@/lib/utils"; */ // v1.4.34 IW-G — floor at 44 px on mobile to clear WCAG 2.5.5; shrink // to 40 px on sm+ where the pointer precision is higher. +// +// Chevron symmetry: `appearance-none` drops the browser-drawn dropdown arrow, +// whose right inset is OS-controlled and reads visibly farther from the edge +// than the value text sits from the left. We paint our own chevron as a +// background SVG positioned `right 0.75rem center` (12 px) so its inset mirrors +// the left text padding (`px-3`) — matching the shadcn ``. +// Doing it as a background (rather than an overlay element) keeps ` {children} diff --git a/src/components/ui/select.tsx b/src/components/ui/select.tsx index d81dbcd6b..6f88f7b06 100644 --- a/src/components/ui/select.tsx +++ b/src/components/ui/select.tsx @@ -56,7 +56,14 @@ function SelectTrigger({ > {children} - + {/* `-me-0.5` (-2 px end margin) optically aligns the chevron with the + left text inset. The trigger box is `px-3` (12 px both sides), but + the Lucide chevron glyph carries ~2 px of empty space inside its + 16 px bounding box, so the *visible* stroke landed ~2 px farther + from the right edge than the value text sits from the left — the + trigger read lopsided. Pulling the icon box 2 px toward the edge + makes the visible chevron and the value text inset symmetric. */} + );