Enter to open · arrow keys to move · results come from a build-time index, no network calls

Design knowledge base

Edit this page

Reference material for building and reviewing a frontend that reads as designed rather than generated. The plugin's skills stay short and link here when they need depth.

Who reads this#

An AI agent, mid-task. You have either just been asked to build UI, or you have captured a page with inspect_localhost_ui and now have to judge it.

These files exist because "make it look good" is not actionable, and because a model writing CSS from memory reaches for the same defaults every time — the ones that make output recognisable as machine-written. The corrections here are specific enough to apply without further interpretation.

How to use it#

Read the file that matches the decision in front of you. Do not read all five before starting; that spends context you will need for the code.

SituationRead
Reviewing a capture, looking for what is wrongANTI-SLOP.md
Setting up a project's visual foundation from nothingCOLOR, then TYPOGRAPHY, then SPACING-LAYOUT
One specific decision (a size, a colour, a duration)that file's table only
Adding or auditing animationMOTION.md
Deciding whether a section should be a card gridANTI-SLOP §10, then SPACING-LAYOUT

The files#

FileContentsUse when
ANTI-SLOP.mdThe recognisable tells of machine-generated UI, why each reads that way, and the concrete correctionReviewing any page, or before writing the first line of a new component
TYPOGRAPHY.mdModular type scale, line-height and measure, letter-spacing, font pairing, variable fonts, loading mechanics, OpenType features, text-wrapText looks flat or uniform, lines run too wide, or the page shifts on font load
COLOR.mdDeriving a palette from one accent, OKLCH ramps, tinted neutrals, semantic tokens over primitives, WCAG contrast, dark mode as a mappingChoosing any colour, or checking contrast
SPACING-LAYOUT.md4px spacing scale, proximity, optical alignment, grid vs flex, container queries, min()/clamp()/aspect-ratio/gap, density, named z-indexSpacing is arbitrary or uniform, or layout defaults to a card grid
MOTION.mdDuration bands, easing by intent, compositor-safe properties, prefers-reduced-motion, stagger, view transitions, what never to animateAdding animation, or a transition feels slow, floaty or gratuitous

Ground rules that apply across all five#

  1. Decide with a system, not per element. Every size, colour, space and duration comes from a named scale. A value that appears once and belongs to no scale is the signal that a decision was improvised.
  2. Uniformity is not consistency. Consistency means the same decision in the same situation. Uniformity — one radius, one padding, one shadow, one text size everywhere — removes the hierarchy a reader navigates by.
  3. Contrast is a requirement, not a preference. WCAG 2.2 AA: 4.5:1 for body text, 3:1 for large text (18.66px bold or 24px regular and above) and for UI component boundaries and focus indicators. Check it; do not estimate it.
  4. Every interactive element needs four states. Rest, hover, :focus-visible, disabled — plus active where the element commits an action. Missing focus styling is an accessibility failure, not a polish item.
  5. Every data-driven surface needs four states. Loading, empty, error, populated. A component that renders only the happy path is unfinished.
  6. Prefer the platform. oklch(), container queries, text-wrap: balance, aspect-ratio, gap, :focus-visible, color-mix() and view transitions are CSS features, not libraries. Add a dependency only when the platform genuinely lacks the capability.
  7. Respect user preferences. prefers-reduced-motion and prefers-color-scheme are inputs to the design, not edge cases.
  8. Verify with a capture. Reasoning about rendered output without looking at it is how the original problem started. Change, re-capture, compare.

Working order for a new project#

Foundations first: later decisions depend on earlier ones, and retrofitting a scale after components exist means touching every file.

StepDecisionFile
1One accent hue, neutral tint, semantic token namesCOLOR.md
2Font stack and the ratio for the type scaleTYPOGRAPHY.md
3Spacing base, radius scale, container widths, z-index namesSPACING-LAYOUT.md
4Named durations and easingsMOTION.md
5Build components using only tokens from 1–4
6Review against the fast passANTI-SLOP.md

If the project already has a design system, tokens or a component library, use it. Do not introduce a second scale alongside an existing one — read the existing tokens first and extend them.

Reviewing rather than building#

When you have a capture and the task is judgement, not construction:

  1. Run the fast review pass in ANTI-SLOP.md against the screenshot before reading any code.
  2. Check consoleLogs and failedRequests — an empty box is usually a 404, not a styling problem.
  3. Use simplifiedDOM for real selectors. Never name a class you have not seen in the tree.
  4. Report defects with the evidence that shows them, and cite the file and section that defines the correction.
  5. Distinguish a defect (fails contrast, no focus ring, overflows) from a preference (a hue you would have chosen differently). Report the first as a problem and the second as an option, if at all.

Token vocabulary#

The five files assume one shared naming convention so a token written in one place is recognisable in another. If the project already names things differently, follow the project.

PrefixHoldsDefined in
--surface-*, --text-*, --border-*Semantic colour rolesCOLOR.md
--accent*, --success*, --warning*, --danger*Accent and status colourCOLOR.md
--text-<size>Type scale stepsTYPOGRAPHY.md
--space-<n>Spacing scale stepsSPACING-LAYOUT.md
--radius-*Radius scaleSPACING-LAYOUT.md
--z-*Named stacking levelsSPACING-LAYOUT.md
--dur-*, --ease-*Motion durations and curvesMOTION.md
--elev-*Layered shadowsANTI-SLOP.md §7

Two rules about tokens. A component reads semantic tokens, never primitives — so a theme change is a token remap rather than a component edit. And a hard-coded value in a component is a bug report about the scale: either the scale is missing a step, or the value should not exist.

Scope#

These files cover visual and interaction craft. They do not cover component API design, state management, framework choice, or full accessibility conformance — the contrast, focus, motion-preference and tap-target guidance here is a floor, not an audit. For accessibility work beyond that floor, test with a keyboard and a screen reader, and consult WCAG directly.

Everything asserted here is a CSS feature, a WCAG threshold, or a stated design rationale. There are no benchmarks or measurements in these files; if you need a number about your own app, measure it.