Skip to content

Commit 2af8351

Browse files
committed
fix(gallery): define only the destructive token that is actually read
The previous commit deleted --color-success for being dead and then added --destructive-foreground, which is equally dead. Nothing under gallery/ reads it in any form: the destructive button variant is deliberately transparent at rest and colours its TEXT, so it uses text-muted-foreground with a hover:text-destructive, and Tailwind drops --color-destructive-foreground from the compiled output entirely. Removed, so only --destructive is defined, which 15 call sites do read. The --color-success deletion is reverted too. It is pre-existing, inert, and six other mapped-but-unused tokens sit beside it, so removing that one and leaving the rest was arbitrary rather than principled, and it put an unrelated pre-existing cleanup inside a branding PR. The net change to input.css is now one corrected comment.
1 parent 480e5d1 commit 2af8351

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

gallery/app/layout.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,17 @@ export default function RootLayout({ children }: { children: unknown }) {
109109
--border-strong: light-dark(oklch(0.78 0.014 70 / 0.95), oklch(0.36 0.02 60 / 0.95));
110110
--input: light-dark(oklch(0.88 0.012 70 / 0.9), oklch(0.24 0.015 60 / 0.9));
111111
--ring: light-dark(oklch(0.63 0.17 50), oklch(0.78 0.18 58));
112-
/* public/input.css maps --color-destructive, and 20 call sites across
113-
the demos use text-destructive / bg-destructive for validation
114-
errors, but nothing ever DEFINED it. An undefined var() left every
115-
error message painting in the ordinary foreground colour and the
116-
destructive button variant with no fill at all. Values follow the
117-
@webjsdev/ui registry theme, warmed a few degrees of hue to sit in
118-
this palette rather than beside it. */
112+
/* public/input.css maps --color-destructive, and the demos use
113+
text-destructive for validation errors and hover:bg-destructive/10
114+
on the destructive button, but nothing ever DEFINED it. An
115+
undefined var() left every error message painting in the ordinary
116+
foreground colour and the button's hover fill absent. Value follows
117+
the @webjsdev/ui registry theme, warmed a few degrees of hue to sit
118+
in this palette rather than beside it. Only this one token: the
119+
matching -foreground is mapped but read by nothing here, since the
120+
destructive variant is deliberately transparent at rest and colours
121+
its TEXT, so defining it would be dead weight. */
119122
--destructive: light-dark(oklch(0.58 0.22 27), oklch(0.70 0.19 22));
120-
--destructive-foreground: light-dark(oklch(0.99 0.005 60), oklch(0.14 0.015 60));
121123
122124
--primary-tint: color-mix(in oklch, var(--ring) 22%, transparent);
123125
--accent-tint: color-mix(in oklch, var(--ring) 14%, transparent);

gallery/public/input.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
app/layout.ts so the ring and its halo are the same hue. */
6262
--color-primary-tint: var(--primary-tint);
6363

64+
/* One extra semantic shadcn does not ship: success (a couple of status
65+
affordances use it). Added the canonical @theme way, not a parallel
66+
vocabulary. */
67+
--color-success: var(--success);
68+
6469
--font-display: var(--font-display);
6570
--font-sans: var(--font-sans);
6671
--font-serif: var(--font-serif);

0 commit comments

Comments
 (0)