FOUNDATIONS FEATURE
The token contract
One fixed set of design tokens (surfaces, text, accent, state, border, radius, motion, type) that every skin emits for light and dark. Skins decide values.
Every swatch is a real --ui-* token. Toggle the colour mode in the header — the whole contract repaints from one declaration per token.
The token contract
A skin is not a stylesheet — it is a set of values for a fixed contract. Every Semitexa skin emits the same design tokens as CSS custom properties, so a component can reference --ui-accent-brand and be certain it exists, in light and dark, in every skin. The contract is the stable seam between "what it looks like" (the skin) and "what it is" (the component).
Eight families
The contract groups into eight token families:
- Surfaces —
--ui-surface-page,--ui-surface-panel,--ui-surface-raised,--ui-surface-sunken - Text —
--ui-text-primary,--ui-text-muted,--ui-text-on-accent - Accent —
--ui-accent-brand(and secondary) - State —
--ui-state-success,--ui-state-warning,--ui-state-danger - Border —
--ui-border-subtle,--ui-border-strong - Radius —
--ui-radius-sm/md/lg, plusnoneandpill - Motion —
--ui-motion-duration-* - Type —
--ui-font-sans,--ui-font-mono
Each token is emitted with light-dark(…, …), so a single declaration carries both modes and the colour-mode toggle repaints the whole UI by switching one attribute. The swatches above are real tokens — flip the theme and watch the contract repaint.
Because every skin fills the same slots, re-theming is swapping one tokens.css, light/dark is two value sets of one contract, and multi-tenant theming is a lookup — all without touching a component. This is the substrate the token-driven UI pillar builds on.
How it works
The contract groups into eight families: surfaces (`--ui-surface-page/panel/raised/sunken`), text (`--ui-text-primary/muted/on-accent`), accent (`--ui-accent-brand`…), state (`--ui-state-success/warning/danger`), border (`--ui-border-subtle/strong`), radius (`--ui-radius-sm/md/lg`…), motion (`--ui-motion-duration-*`) and type (`--ui-font-sans/mono`). Each token is emitted with `light-dark(…, …)`, so one declaration carries both modes and the colour-mode toggle flips the whole UI by switching `data-skin-mode`. The swatches above are real tokens — flip the theme and watch the contract repaint.
Why it matters
A fixed contract is what makes skins swappable and components portable. Because every skin fills the same slots, you can re-theme by swapping one `tokens.css`, support light/dark as two value sets of one contract, and theme multi-tenant by a (tenant, domain, locale) lookup — without touching a single component. Components never learn the brand; they only speak `--ui-*`.