Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/feat-accessible-text-tokens.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add accessible text tokens (--text-warning, --text-error, --text-success) and Tailwind utilities text-warning-foreground, text-error-foreground, text-success-foreground for use on white or matching -soft / tinted fills.
11 changes: 11 additions & 0 deletions src/theme/tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@
--text-tertiary: #94A3B8;
--text-inverse: #ffffff;

/* Accessible text variants for use on white or matching -soft / tinted
fills. Kept distinct from --color-warning / --color-error / --color-success
fill values (which are tuned for badges and status dots and do not always
clear WCAG AA when used as text). */
--text-warning: #d9480f; /* Mantine orange.9; AA on white (4.81:1) and on a 14% --color-warning tint */
--text-error: #B91C1C; /* Tailwind red-700; AA on white (5.94:1) and on a 12% --color-error tint */
--text-success: #285E61; /* primary[700]; AA on white (7.07:1) and on success-soft */

/* Diverging color scales */
--diverging-gray-teal-1: #475569;
--diverging-gray-teal-2: #94A3B8;
Expand Down Expand Up @@ -117,6 +125,9 @@
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-destructive-foreground: var(--destructive-foreground);
--color-warning-foreground: var(--text-warning);
--color-error-foreground: var(--text-error);
--color-success-foreground: var(--text-success);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
Expand Down