feat(theme): implement accessible Technical-Light 1.0 contracts
This commit is contained in:
@@ -6,8 +6,7 @@ human-readable index of the Technical-Light design system. The authoritative sou
|
||||
for the auth component.
|
||||
|
||||
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.
|
||||
**no hardcoded hex values** appear in component markup or CSS. Product overrides are scoped to the `ThemeShell` subtree through the complete accent parameter family. Semantic status/info tokens remain shared.
|
||||
|
||||
---
|
||||
|
||||
@@ -45,10 +44,23 @@ is `--accent` on the `ThemeShell` root element via the `Accent` parameter.
|
||||
|---|---|---|
|
||||
| `--accent` | `#2f5fd0` | Links, sort arrows, primary actions, active nav indicator |
|
||||
| `--accent-deep` | `#1e3f99` | Hover / pressed accent; raw-value emphasis |
|
||||
| `--accent-tint` | `#eef2fc` | Selected surface |
|
||||
| `--accent-border` | `#cdd9f7` | Subtle interactive border |
|
||||
| `--accent-focus` | `#1e3f99` | Keyboard focus |
|
||||
| `--on-accent` | `#ffffff` | Primary action label |
|
||||
| `--active-bg` | `var(--accent-tint)` | Compatibility alias, rebound on `.app-shell` |
|
||||
|
||||
> `--accent` is the **only token overridden per-app**. Pass it as `ThemeShell`'s
|
||||
> `Accent` parameter: `<ThemeShell Accent="#2f855a">` → emits
|
||||
> `style="--accent: #2f855a"` on the shell root, scoping the override to that subtree.
|
||||
Use `Accent`, `AccentDeep`, `AccentTint`, `AccentBorder`, and `AccentFocus` together
|
||||
for a product color family. Existing Accent-only callers still work; omitted values inherit.
|
||||
Approved caller values must be trusted authored configuration. No inline style is emitted
|
||||
when all five parameters are absent. Root semantic info stays blue through `--info-ink`.
|
||||
|
||||
Bootstrap `.btn-primary` and `.btn-link` bind component variables to this subtree's tokens.
|
||||
Links and ghost text use the deep accent: green/teal primary colors need white labels
|
||||
and fall below 4.5:1 as small text on warm paper. See the release decision for values.
|
||||
Do not duplicate sizing or override group seams. Active links consume `--accent-tint`
|
||||
directly, avoiding the root custom-property alias resolution trap. Actual hover, pressed,
|
||||
focus and disabled styles still require the package canary browser checks.
|
||||
|
||||
---
|
||||
|
||||
@@ -129,8 +141,9 @@ inherit the Technical-Light aesthetic. They are **harmless if Bootstrap is absen
|
||||
|
||||
1. **Never hand-pick hex values in feature CSS.** Use the tokens above or the utility
|
||||
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.
|
||||
2. **One complete per-app accent family.** Use the five `ThemeShell` accent parameters.
|
||||
Keep semantic status/info tokens uniform. Explicit supported dark schemes own their
|
||||
readable aliases and require separate verification.
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user