fix(theme): make shared status and supporting text readable
This commit is contained in:
@@ -2,11 +2,10 @@
|
||||
|
||||
Canonical reference for every CSS custom property declared in `theme.css`. This is the
|
||||
human-readable index of the Technical-Light design system. The authoritative source is
|
||||
`ZB.MOM.WW.Theme/src/ZB.MOM.WW.Theme/wwwroot/css/theme.css` (verified 2026-06-01,
|
||||
379 lines). Analogous to [`../auth/spec/CANONICAL-ROLES.md`](../../auth/spec/CANONICAL-ROLES.md)
|
||||
`ZB.MOM.WW.Theme/src/ZB.MOM.WW.Theme/wwwroot/css/theme.css` (updated for the 1.0.0 candidate, November 13, 2026). Analogous to [`../auth/spec/CANONICAL-ROLES.md`](../../auth/spec/CANONICAL-ROLES.md)
|
||||
for the auth component.
|
||||
|
||||
The token block lives in `:root` (lines 39–77). Components reference these tokens —
|
||||
The canonical token block lives in `:root`. Components reference these tokens —
|
||||
**no hardcoded hex values** appear in component markup or CSS. The only per-app override
|
||||
is `--accent` on the `ThemeShell` root element via the `Accent` parameter.
|
||||
|
||||
@@ -27,7 +26,7 @@ is `--accent` on the `ThemeShell` root element via the `Accent` parameter.
|
||||
|---|---|---|
|
||||
| `--ink` | `#1b1d21` | Primary text |
|
||||
| `--ink-soft` | `#5a6066` | Secondary text, form labels |
|
||||
| `--ink-faint` | `#8b9097` | Tertiary text, captions, units, nav eyebrow labels |
|
||||
| `--ink-faint` | `#626970` | Supporting text, captions, units and navigation labels |
|
||||
|
||||
---
|
||||
|
||||
@@ -53,21 +52,37 @@ is `--accent` on the `ThemeShell` root element via the `Accent` parameter.
|
||||
|
||||
---
|
||||
|
||||
## Status tokens — foreground
|
||||
## Status tokens — signals and readable text
|
||||
|
||||
| Token | Value | Role |
|
||||
|---|---|---|
|
||||
| `--ok` | `#2f9e44` | Success / healthy / connected state text + icon color |
|
||||
| `--warn` | `#e8920c` | Warning / degraded state text + icon color |
|
||||
| `--bad` | `#e03131` | Error / faulted / disconnected state text + icon color |
|
||||
| `--idle` | `#868e96` | Unknown / offline / neutral state text + icon color |
|
||||
| `--ok` | `#2f9e44` | Success / healthy / connected dots, stripes and charts |
|
||||
| `--warn` | `#e8920c` | Warning / degraded dots, stripes and charts |
|
||||
| `--bad` | `#e03131` | Error / faulted / disconnected dots, stripes and charts |
|
||||
| `--idle` | `#868e96` | Unknown / offline / neutral dots, stripes and charts |
|
||||
|
||||
---
|
||||
|
||||
## Semantic text inks
|
||||
|
||||
| Token | Value | Role |
|
||||
|---|---|---|
|
||||
| `--ok-ink` | `#236f34` | Success/connected text |
|
||||
| `--warn-ink` | `#855000` | Warning/degraded text |
|
||||
| `--bad-ink` | `#b42121` | Fault/error text |
|
||||
| `--idle-ink` | `#535d66` | Unknown/idle text |
|
||||
| `--info-ink` | `#1e3f99` | Informational blue independent of product accent |
|
||||
| `--warn-ink-deep` | `#8a5a00` | Existing deep warning emphasis |
|
||||
|
||||
`.s-*`, `.chip-*`, connection labels, counts and key/value text use semantic inks.
|
||||
Dots retain the original saturated signal colors. Status labels remain textual; color
|
||||
supplements their meaning. Normal-size text requires at least 4.5:1 on its actual surface.
|
||||
Consumer opacity and local overrides must be checked in the browser as well as token math.
|
||||
|
||||
## Status tokens — tinted backgrounds
|
||||
|
||||
Pair each with the matching foreground token above (e.g. `--ok-bg` background with `--ok`
|
||||
foreground text). Used by `.chip-ok`, `.chip-warn`, `.chip-bad`, `.chip-idle` classes.
|
||||
Pair each with the matching readable ink (e.g. `--ok-bg` background with `--ok-ink`
|
||||
foreground text). Keep saturated signal tokens for non-text indicators. Used by `.chip-ok`, `.chip-warn`, `.chip-bad`, `.chip-idle` classes.
|
||||
|
||||
| Token | Value | Role |
|
||||
|---|---|---|
|
||||
@@ -77,7 +92,7 @@ foreground text). Used by `.chip-ok`, `.chip-warn`, `.chip-bad`, `.chip-idle` cl
|
||||
| `--idle-bg` | `#eef0f2` | Idle/neutral tinted background |
|
||||
|
||||
> The `Info` status variant (`StatusState.Info`, `chip-info`) is defined in `layout.css`
|
||||
> (not `theme.css`) and uses `--accent-deep` foreground on `#e7ecfb` background.
|
||||
> (not `theme.css`) and uses independent blue `--info-ink` on `--info-bg` (`#e7ecfb`).
|
||||
|
||||
---
|
||||
|
||||
@@ -116,8 +131,8 @@ inherit the Technical-Light aesthetic. They are **harmless if Bootstrap is absen
|
||||
classes (`.s-ok`, `.s-warn`, `.s-bad`, `.s-idle`, `.chip-*`, `.kv .v.*`).
|
||||
2. **One per-app override only.** Override `--accent` via `ThemeShell`'s `Accent`
|
||||
parameter. Do not override other tokens per-app.
|
||||
3. **Status is colour, not iconography.** The status palette (`--ok`, `--warn`, `--bad`,
|
||||
`--idle`) is the canonical way to communicate state. Use `StatusPill` for chips; use
|
||||
`.s-*` utility classes for inline text.
|
||||
3. **Status has text as well as color.** Use semantic inks for labels and values; retain
|
||||
signal colors for dots/stripes/charts. Use `StatusPill` for labeled chips and `.s-*`
|
||||
utility classes for inline text. Do not rely on color alone.
|
||||
4. **Token changes are breaking.** Renaming or removing a token requires a SemVer major
|
||||
bump of `ZB.MOM.WW.Theme` and a coordinated update in every consumer app.
|
||||
|
||||
Reference in New Issue
Block a user