mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 13:52:20 +00:00
fix(ui): show text-field focus as a neutral border, not a purple ring
Every text-entry control (Input, Textarea, Select and NativeSelect triggers, the date and time fields, the calendar's dropdowns, the Coach composer and the hand-built note fields) now marks focus by turning its border the new neutral input-focus tone, about 5:1 on the dark background and 4:1 on the light one, with no ring. A text field matches :focus-visible on every mouse click, so the ring was on for everyone. An invalid field keeps its red border and draws its destructive ring only while focused. Buttons, links, checkboxes and switches keep their rings. text-field-focus-guard.test.ts fails when a text-field class string brings a focus ring or a primary/ring-coloured focus border back.
This commit is contained in:
1 parent
b6ce54e2c6
commit
bed47387de
17 files changed
+156
-28
No files matched your search
@@ -56,6 +56,7 @@
|
||||
--color-chart-1: var(--chart-1);
|
||||
--color-ring: var(--ring);
|
||||
--color-input: var(--input);
|
||||
--color-input-focus: var(--input-focus);
|
||||
--color-border: var(--border);
|
||||
--color-destructive: var(--destructive);
|
||||
--color-accent-foreground: var(--accent-foreground);
|
||||
@@ -241,6 +242,9 @@
|
||||
--destructive: #ff5555;
|
||||
--border: #44475a;
|
||||
--input: #44475a;
|
||||
/* Text-field focus border: a neutral, foreground-based tone, no colour
|
||||
* ring. ~5.2:1 on --background, ~6:1 on --card. */
|
||||
--input-focus: #9a9b9d;
|
||||
--ring: #bd93f9;
|
||||
--chart-1: #bd93f9;
|
||||
--chart-2: #50fa7b;
|
||||
@@ -369,6 +373,8 @@
|
||||
--success-foreground: #ffffff;
|
||||
--border: oklch(0.885 0.008 300);
|
||||
--input: oklch(0.87 0.009 300);
|
||||
/* Text-field focus border, neutral: ~4.2:1 on --background. */
|
||||
--input-focus: oklch(0.56 0.012 295);
|
||||
--ring: oklch(0.6 0.13 292);
|
||||
--chart-1: #644ac9;
|
||||
--chart-2: #14720a;
|
||||
|
||||
Reference in new issue
Block a user