apps/shade/src/docs/tokens.mdx
import { Meta } from '@storybook/addon-docs/blocks';
<Meta title="Tokens / Tokens Guide" /> <div className="sb-doc">radius-control, radius-surface, radius-pill).md: / lg: variants.Toggle light/dark from the Storybook toolbar to see semantic tokens flip.
Semantic tokens are named by purpose — --background, --text-primary, --border-default, --surface-elevated. They flip between light and dark mode automatically. Reach for these by default.
Raw tokens are concrete values — --color-gray-500, --text-base, --spacing. They never change between modes. Use only when no semantic token fits (chart series, brand assets, illustrations).
apps/shade/theme-variables.css — semantic tokens + dark-mode overrides.apps/shade/tailwind.theme.css — Tailwind @theme block: raw catalogue and bindings.bg-background, text-foreground, rounded-md — over inline styles.hsl() values. They don't theme and don't dark-mode.var(--token) directly. Don't wrap in hsl() — the variables already contain hsl(…).dark: variants for colour. The tokens do that. (Exceptions: assets like logos and illustrations.)