Skip to content

design(tokens): civiccore-ui/tokens/tokens.css — the suite token authority (AA-validated) - #66

Merged
scottconverse merged 1 commit into
mainfrom
design/tokens-authority
Jul 3, 2026
Merged

design(tokens): civiccore-ui/tokens/tokens.css — the suite token authority (AA-validated)#66
scottconverse merged 1 commit into
mainfrom
design/tokens-authority

Conversation

@scottconverse

Copy link
Copy Markdown
Contributor

Establishes civiccore-ui/tokens/tokens.css as the suite's single token source of truth, dropping into the empty slot the repo already reserved (civiccore-ui/tokens/, components/, shell/ were .gitkeep-only). Produced by the design collaboration; extracted from the canonical prototype (docs/design/ui-ux-prototype/styles.css in the umbrella repo), which remains authoritative for the component layer.

What's here

  • tokens.css — color neutrals + ink ramp, civic brand (navy/gold), status palette, type families, density metrics, radii, as documented CSS custom properties with contrast noted per token.
  • tokens-reference.html — live palette/type/density/status reference with the contrast ledger rendered.

Values are verbatim from the prototype except three documented WCAG-AA corrections

Independently re-verified every contrast ratio in the file (own WCAG 2.x computation, not the designer's numbers):

pairing ratio verdict
white on --gold #b08a2e 3.22:1 FAILS AA normal text → --gold is now accent/border/large-text only
white on --gold-2 #8a6a1f 5.05:1 PASS — the text-bearing gold
--gold-strong #785b16 on --gold-soft (NEW) 5.43:1 PASS — gold text on pale gold (gold-2 there is only 4.32:1)
--ink-4 #9aa0ab on --paper 2.48:1 FAILS → encoded decorative-only in the token comment

All status pairs (ok/warn/err/info on their soft surfaces) verified AA on their own background.

Transparency notes (per the review guardrails)

  • No shipped surface changes. The only AA-failing usage in the org is .btn.gold in the prototype stub — never instantiated on the live landing page. I'll strip the dead .btn.gold rule from the landing/prototype CSS in the umbrella design PR.
  • Additive tokens beyond the three AA fixes: the file adds --err/--err-soft and --neutral-soft status tokens and the --row-h/--pad/--gap density metrics. These change no existing value (still "verbatim" for everything the prototype defined) and nothing consumes them yet — they round out the system for the component layer.
  • Removed the Google Fonts CDN link from tokens-reference.html: CivicSuite makes no outbound calls, so a design reference that phones a CDN is off-posture. It now renders in the token stack's local/fallback faces. Revert if the exact webfaces must render in the reference.

Consumption (next, not in this PR)

Offline binaries can't @import at runtime, so consumers (desktop styles.css, the prototype) will vendor a generated copy pinned to a civiccore version, with a CI --check drift gate — same idiom as the source_commit pins and the generated topology block. The umbrella PR carries the design-control amendment naming this file the token authority and the patterns doc.

🤖 Generated with Claude Code

@scottconverse
scottconverse merged commit 78033cc into main Jul 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant