| name | elite-frontend-ux-2-design-token-system |
| description | Sub-skill of elite-frontend-ux: 2. Design Token System. |
| version | 1.0.0 |
| category | development |
| type | reference |
| scripts_exempt | true |
2. Design Token System
2. Design Token System
Always open the implementation with these CSS variables. Never eyeball spacing or
pick arbitrary colors.
:root {
--font-size-xs: 0.75rem;
--font-size-sm: 0.875rem;
--font-size-base: 1rem;
--font-size-lg: 1.125rem;
--font-size-xl: 1.25rem;
--font-size-2xl: 1.5rem;
--font-size-3xl: 2rem;
--font-size-4xl: 2.5rem;
--font-size-5xl: 3.5rem;
--space-1: 0.25rem;
--space-2: 0.5rem;
--space-4: 1rem;
--space-6: 1.5rem;
--space-8: 2rem;
--space-12: 3rem;
--space-16: 4rem;
--space-20: 5rem;
--space-32: 8rem;
--background: 0 0% 100%;
--foreground: 222 47% 11%;
--primary: 222 47% 11%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96%;
--secondary-foreground: 222 47% 11%;
--muted: 210 40% 96%;
--muted-foreground: 215 16% 47%;
--border: 214 32% 91%;
--ring: 222 47% 11%;
--destructive: 0 84% 60%;
--success: 142 76% 36%;
--warning: 38 92% 50%;
--radius: 0.5rem;
--duration-fast: 100ms;
--duration-normal: 200ms;
--duration-slow: 300ms;
--ease-default: cubic-bezier(0.4, 0, 0.2, 1);
--ease-out: cubic-bezier(0, 0, 0.2, 1);
--ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dark {
--background: 222 47% 4%;
--foreground: 210 40% 98%;
--border: 217 33% 17%;
--muted: 217 33% 17%;
--muted-foreground: 215 20% 65%;
}
Typography rules:
- Line height: 1.5–1.6 body, 1.1–1.2 headings
- Line length: 45–75 chars (
max-w-prose or max-w-2xl)
- Max 2–3 typefaces per design
- NEVER use Inter/Roboto/Arial as primary (overused)
- PAIR: one distinctive display font + one refined body font
Distinctive font suggestions:
- Display: Fraunces, Instrument Serif, Space Grotesk, Clash Display, Cabinet Grotesk, Satoshi
- Body: Source Serif Pro, IBM Plex Sans, Libre Franklin, Plus Jakarta Sans