fix(theme): R10 S1 follow-ups — dedicated info token + restore collapsed hovers
- Add --info/--info-fg (blue; dark #60a5fa / light #2563eb) so info notifications
stop borrowing --accent, which collided with a status colour in schemes whose
accent shares its hue (YouTube red = error, Slate orange = warn, Matrix/Forest
green = success). Toaster info tone accent -> info.
- Restore hover feedback the codemod flattened: 'bg-X ... hover:bg-X' /
'text-X ... hover:text-X' collapsed to a no-op once both shades mapped to one
shadeless token. Reuse the house hover:opacity-{80,90} idiom (ConfirmProvider
danger button, DownloadCenter error link).
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
bg-{status} fill always has a readable text-{status}-fg partner available
|
||||
(Tailwind v4 only emits a utility when it sees it used; success-fg has no fill
|
||||
consumer today). Keeps the semantic token set complete + future-proof. */
|
||||
@source inline("text-danger-fg text-warn-fg text-success-fg");
|
||||
@source inline("text-danger-fg text-warn-fg text-success-fg text-info-fg");
|
||||
|
||||
/* `inline` is load-bearing: the color vars (--bg/--accent/… below) are redefined at
|
||||
runtime per html[data-scheme]/[data-theme], so utilities must inline the value and
|
||||
@@ -20,6 +20,8 @@
|
||||
--color-muted: var(--muted);
|
||||
--color-accent: var(--accent);
|
||||
--color-accent-fg: var(--accent-fg);
|
||||
--color-info: var(--info);
|
||||
--color-info-fg: var(--info-fg);
|
||||
--color-danger: var(--danger);
|
||||
--color-danger-fg: var(--danger-fg);
|
||||
--color-warn: var(--warn);
|
||||
@@ -683,6 +685,8 @@ html[data-theme="dark"] {
|
||||
--warn-fg: #1f1400;
|
||||
--success: #34d399;
|
||||
--success-fg: #052016;
|
||||
--info: #60a5fa;
|
||||
--info-fg: #08172e;
|
||||
}
|
||||
html[data-theme="light"] {
|
||||
--danger: #dc2626;
|
||||
@@ -691,6 +695,8 @@ html[data-theme="light"] {
|
||||
--warn-fg: #ffffff;
|
||||
--success: #047857;
|
||||
--success-fg: #ffffff;
|
||||
--info: #2563eb;
|
||||
--info-fg: #ffffff;
|
||||
}
|
||||
|
||||
/* Toast auto-dismiss countdown bar (shrinks left-to-right to zero) */
|
||||
|
||||
Reference in New Issue
Block a user