Commit 1809d8b
fix(field): remove the double border on focus
The field utility was doing two things at once: recolouring the 1px border to
magenta AND drawing the brand's 2px magenta ring offset by the page colour. The
result was three concentric edges — magenta border, page-colour gap, magenta
ring — so a focused Input, Textarea or SelectTrigger read as a double border.
The ring is the part the brand specifies ("2px magenta ring, offset by the page
colour"), so the border recolour is what goes. It stays on its resting grey:
the ring is the affordance, and the border's job is to delineate the field,
which it does whether or not the field has focus.
Fixes all three consumers at once — Input, Textarea and SelectTrigger share the
utility and none add focus styling of their own. Nothing else in the set could
have the same bug: every other component uses Tailwind's ring utilities and
none recolour a border on focus.
Side benefit: an invalid field that has focus now shows its red border and the
magenta ring together, where previously the focus border overwrote the
aria-invalid one and hid the error state.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 5e84aac commit 1809d8b
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
99 | | - | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| |||
0 commit comments