website-design-systemlisted
Install: claude install-skill karero/website-builder
# Website design system
Owns the **how it looks and performs visually** layer: mobile graphics, dark
mode, and the theme tokens. Outputs/maintains `BRAND.md` (template in
`~/.claude/skills/new-website/templates/brand.md`) and the token block in
`~/.claude/skills/new-website/templates/astro/src/styles/global.css`. Image rules
are below (WebP/AVIF via Astro's `astro:assets`); the `images.spec.ts` test
enforces them. For generating image assets, use the `image` skill.
## Dark mode (first-class)
- **Tokens, not hard-coded colours.** All colour flows through CSS custom
properties; light is the `:root` default, dark overrides under
`:root[data-theme="dark"]`, plus a `@media (prefers-color-scheme: dark)` block
for no-JS visitors. The starter ships this exact structure.
- **No-FOUC script** in `<head>` sets `data-theme` from `localStorage.theme` or
the system preference *before first paint* (already wired in `Base.astro`).
The toggle writes `localStorage.theme`.
- **Contrast both themes:** every text/background pair passes WCAG AA (4.5:1
body, 3:1 large/UI). A colour that passes in light often fails in dark — the
a11y test runs the full light+dark matrix, so check both.
## Mobile & responsive graphics
- **Mobile first:** design from 360px up; tap targets ≥ 44px; no horizontal
scroll. Verify at 360 / 768 / 1280 (preview_resize).
- **Modern formats:** WebP (or AVIF) over JPEG/PNG for photos.
- **Size to display, not source.** Never ship a 2000px image into an 80px