11ai Core WWW Styleguides
The house design language for web applications, parameterized by whatever the user brings. Precedence, always:
- User-specified tokens and fonts: kept verbatim.
- Missing pieces: generated as balanced equivalents of what was given.
- Nothing given: the bundled defaults, verbatim.
Copy from the bundled references instead of reimplementing:
- references/default-tokens.css: the complete
default stylesheet: Tailwind v4 imports,
@theme inlinemapping, both token modes, base layer, and highlighting rules. - references/token-derivation.md: how to expand partial input into the full two-mode set, and the contrast gates.
- references/fonts.md: font defaults, pairing and derivation rules, next/font mechanics.
- references/app-wiring.md: layout, theme provider, shadcn configuration, and the pre-delivery verification list.
Workflow
- Collect what the user specifies: tokens (any format, any subset, one or both modes) and fonts (zero to three roles). Convert colors to oklch.
- Derive the rest per references/token-derivation.md: a single accent expands into primary, foregrounds, chart ramp, and sidebar tokens; a one-mode palette gets its counterpart derived and balanced, light from dark or dark from light.
- Resolve fonts per references/fonts.md.
- Emit the stylesheet and wiring per references/app-wiring.md, starting from the default sheet and replacing only what differs.
- Run the contrast gates and the verification list. Report computed ratios with the delivery; a gate failure is a finding with a lightness fix, never a silent pass.
Design language directives
- oklch for every color literal; tokens only, no hardcoded colors in components.
--radius: 0remis the single lever: square corners, straight lines, hairline--borderrules, no shadows.- One accent family.
--accent-surfacealways derives viacolor-mix(in oklab, var(--primary) 12%, var(--background)), declared once so both modes inherit it. - Dark mode is a first-class citizen, not an inversion: accents lighten to keep text contrast, neutrals map to the bundled dark scale, and the two modes must read as the same brand.
- The full shadcn variable set ships even when the user only cares about a few tokens.
- Fonts through next/font variables only; headings reuse the sans face unless the user says otherwise.
- Theme via next-themes: class attribute, system default, no transition
flash,
dhotkey toggle that respects typing contexts.