Polish
Most work stops at level 3 of 10, because it works and it's easy to stop. The difference between fine and great is rarely the idea; it's how far the idea gets pushed. Most "something feels off" problems are one wrong note, so look, measure and name it before changing anything.
Run it
- Match the stack. Find how the project styles things (Tailwind, CSS variables, CSS Modules, a component library's theme) and make every fix there. When the project has tokens of a kind, a fix of that kind changes or adds a token. Why: a token fix lands on every screen at once; a one-off value is the next screen's bug.
- Render it at its real size and at the smallest size it will be seen (375 px wide at least), in every theme. Capture each state and each motion as frames (Verify, below). Measure in the pixels people see: on a scaled stage a 42 px button may be 37 px on screen.
- Score it against the anchors below and name the weakest thing on screen in one sentence.
- Take stock: every text style (size, weight, line height, alignment), every gray and brand colour, every box with text in it (buttons, fields, toasts, chips), every heading, every row holding a destructive action, and every form, table, empty state and landing hero. This decides which checks run.
- Structure: fix hierarchy and containers before details. Polishing the wrong structure is wasted work (ux-laws owns this if it's the real problem).
- States: map every state, including empty, loading, error, success and offline, and design the unhappy ones.
- Details: walk the 20 tips in references/tips.md, in its order (type, spacing, colour, components, copy, states), then the details table below.
- Motion: run ui-motion on every interaction in scope. Without it, use the minimum at the end of this file.
- Verify frame by frame (below). Nothing is done until you've looked at the frames.
- Climb: run the loop until two passes in a row find nothing that changes the score.
Reviewing instead of changing? Stop before step 10 and change nothing. Open with the stock list from step 4, then one row per finding, sorted by severity, then by where it is on screen:
| Severity | Rule | Where | Before | After |
|---|---|---|---|---|
| broken | Tip 5, Delete far from Save | EditProject.tsx:48 | Delete sits between Cancel and Save | Delete first in the footer with margin-inline-end: auto |
| polish | Tips 2, 13, button padding | button.css:12 | padding: 24px 22px, label fills 30% | padding: 10px 20px, label fills 51% |
Severity is broken (someone can hit the wrong action, lose what they typed, get stuck, can't read it, or a state is missing), friction (slower to read, scan or decide than it needs to be) or polish (looks off, slows no one). Where is the file and line, or the screen, element and frame. When one value breaks two rules, one row names both. List the checks you couldn't run after the table.
Score anchors
| Score | It means |
|---|---|
| 3 | It works, and looks like everything else |
| 5 | Designed at rest, but unhappy states or motion are default |
| 7 | Every state is designed and motion is correct; nothing is memorable yet |
| 8 | One thing people would screenshot, no visible defect at the viewing size |
| 9 | That thing holds up in every state and input path, and a rival would copy it |
| 10 | Don't award this to your own work |
The climb
Early levels fix what's broken, and you can see what to do. Later levels are invention, and you can't, so use a move:
| Stuck because | Move |
|---|---|
| You don't know what better is | Zoom in. Take one element at 3×. What if this were the only thing on screen? |
| It's busy | Remove something. Did you actually need it? |
| It feels off | Name it in one sentence, even before you know the fix |
| It's fine but plain | Reference the best. List what the world-class version does that yours doesn't |
| You keep tweaking one idea | Generate more. Three genuinely different versions, compared at real size; keep one |
| You can't see it anymore | Critique. A fresh reader with no context, or re-read your work as a rival would |
- Each level is one nameable move with a reason. "Add a spring" isn't a reason; "it can be redirected mid-flight, so it never blocks you" is.
- Make the first leap the biggest. Default to designed must be obvious in a still.
- Each level is strictly better than the last. Never ship a deliberately broken step.
- Name the thing people would screenshot. If there isn't one, that's the next job.
- Push the concept into the material, not effects on top. If the idea is a pressure gauge, the needle is the loading state, not a spinner beside it.
- Undo your own decisions when they stop holding up. Restraint counts as a level.
- Land success as the peak. If success is only a label swap, push the concept into it.
- Every input path reaches the same ending: pointer, keyboard, a slow gesture and reduced motion.
Details table
Absence is what gets noticed, so run all of these. Short on time: start with forms, hit area, contrast and layout shift, the ones people feel. The 20 tips cover type, button sizing, padding, heading space, grays, text on colour, hue, dark-mode chroma, shadows, labels, table numbers, sentence case, button labels, empty states and landing CTAs; this table covers the rest.
| Check | Rule | Why |
|---|---|---|
| Fonts | -webkit-font-smoothing: antialiased; subset files | Crisper text, nothing unused shipped |
| Field and button | A resting button and a field never share one fill. The field stays brightest; a waiting button sits one tone down | Two identical slabs hide which one you type in |
| Dynamic numbers | tabular-nums | Digits that change width make neighbours jiggle |
| Weight | Never change font-weight on hover or selection; use colour | It reflows text |
| Layout shift | Fixed dimensions or aspect-ratio for skeletons, images, async content; reserve space for messages | Jumping content reads as broken |
| Typography | … ’ “ ”; text-wrap: balance on headings, pretty on body; 45–75ch measure | Punctuation and rag are where care shows |
| Tracking | Caps +0.08em at any size. Other text: none below 28px, −0.01em at 28–47px, −0.022em from 48px | Large type wants tighter, caps want air |
| Sizes | At most 5 type sizes, one vertical grid | Fewer things |
| Alignment | At most 2–3 dominant vertical lines; icons on a centre spine, text on a left edge | Stray lines are what "off" usually is |
| Optical | Icon side of a button −2 to −3 px padding; play triangles 2 px toward the point; fix asymmetric icons in the SVG | Equal numbers often look unequal |
| Radius | Inner = outer − padding; one radius family | Mismatched nesting is visible |
| Borders | Transparent rings: box-shadow: 0 0 0 1px rgb(0 0 0/.08) | They adapt to any surface |
| Style | One icon style, one material, one neutral temperature | The odd one out reads as a bug |
| Colour fit | Success and error are hues from the page's palette, or moved toward it; real-world meanings stay | A stock green check on an ink page reads as borrowed |
| Contrast | Body and labels ≥4.5:1, large text and icons ≥3:1, over the real background. Nothing people must read under 12 px | "Legible" isn't a judgment call (ui-color measures it) |
| Press | scale(0.97), never below 0.95 | Tactile without exaggeration |
| Hover | Named properties, ~150ms; gated to (hover: hover); no layout change | transition: all animates things you didn't choose |
| Focus | Never remove it. A 2px ring at 3:1 against its surface and the unfocused state; neutral when that passes | Keyboard users lose their place (WCAG 1.4.11, 2.4.13) |
| Hit area | ≥44×44pt iOS, ≥48×48dp Android, ≥40×40px desktop, via a pseudo-element; never overlapping | Small targets miss (Fitts's law) |
| Stacking | isolation: isolate or a fixed z-index scale | 9999 means nobody knows |
| Decoration | pointer-events: none, user-select: none | It can't steal clicks |
| First paint | Resolve state before render: never default-then-correct | Prevents flashes |
| Forms | 16px inputs, real labels, autocomplete, Enter submits, errors keep what was typed | Don't punish; prevent |
| Overlap | When one element grows into another, fade the neighbour out and back | Collisions look like bugs |
| Cast light | Window shadows and light patterns stop at an object's edge | Unbroken bars read as seeing through the object |
Shadows on light surfaces are layered and tinted toward the light (tip 7). On dark surfaces depth comes from lighter raised surfaces, softer text and calmer accents; pure black with neon is inversion, not design.
Verify frame by frame
Motion you haven't looked at frame by frame isn't verified: an eye on a running page misses the one-frame pops that make it feel off. Install the scripts once with npm install --prefix <skill>/scripts.
- Capture on a virtual clock.
node <skill>/scripts/web-frames.mjs <url or file.html> --motion 1200 --trigger click:<selector> --widths 390,1440writes one PNG per frame at 60 fps and a contact sheet labelled in ms. Time is faked and stepped exactly, so every run gives the same frames. Triggers areload,click:,hover:,scroll:<y>andjs:<code>;--clip x,y,w,hzooms in,--reduced-motionand--scheme darkcover the other paths. Without--motionit captures stills at every width (--scheme both,--full,--before "<js>"to set a state). Every run writesconsole.txt, which must be empty. - Plot before you read.
node <skill>/scripts/frame-diff.mjs <frames folder>plots how much each frame changes. A pop, flash or swap is a red spike with still frames around it; a dead stretch is shaded grey. Read the frames it names first, then the contact sheet. - Recordings (iOS Simulator, a device, anything ffmpeg reads):
<skill>/scripts/sim.sh start out.mp4, interact,sim.sh stop out.mp4, thennode <skill>/scripts/sheet.mjs out.mp4 sheet.png --auto --keep frames/andframe-diff.mjs frames/.sim.sh shot <file>takes a full-resolution still. - Measure, don't eyeball.
node <skill>/scripts/edges.mjs <capture.png> --rows y0-y1 --scale 2prints each element's edges and gaps in points (--cols x0-x1for vertical gaps), for the alignment, hit area and spacing checks. - Scrubbed controls: drag each one slowly out and back and read every frame on the way back. A value going to zero gets there continuously.
Run one capture at a time. Check:
- First frame: the response starts at once.
- Origin: something emanating from a trigger starts at the trigger's centre in screen space. Print the numbers.
- Last frame: it settles with no pop, snap or re-layout.
- No flash: no frame shows a wrong state. Test every state pair, under both OS schemes.
- Readable: words are held long enough to read.
- No twitch, no collisions: no backward jump, element swap mid-move, or accidental overlap.
- Reversal: interrupt halfway; it returns smoothly to the right place.
- Same ending: pointer, keyboard and reduced motion finish on the same state.
- Empty submit and stopped states say something in words.
- The 20 tips' Verify list (end of tips.md): computed styles, colours, spacing, labels, empty data, strings, footers, tables, hero.
- Reduced motion, keyboard path, and no console errors.
Then check at the final viewing size: the smallest important text is legible, and the change you're proud of is visible there.
Final read: what's the weakest thing on screen now? If fixing it would change the score, you aren't done. If it wouldn't, stop.
Motion minimum (when ui-motion isn't loaded)
- Used 100+ times a day or from the keyboard → no animation. Occasional (menu, modal, drawer) → under 300ms. Rare (success, onboarding) → may be choreographed, up to ~2.5s.
- Entering or leaving → ease-out
cubic-bezier(0.32, 0.72, 0, 1). Moving on screen → ease-in-outcubic-bezier(0.77, 0, 0.175, 1). Follows a finger → spring, duration 0.5, bounce 0. Never ease-in for an entrance. - Hover 100–150ms, popover 150–250ms, modal or drawer 200–300ms, page 300–400ms. Exits 20–30% faster.
- Only
transformandopacity(blur under 20px). Enter fromscale(0.95)andopacity: 0, neverscale(0). Interruptible by default.prefers-reduced-motionkeeps the information and drops the movement.
Deliver
- Building: the change, made in the project's tokens and components. Then the score before and after, one line per rule you applied (where, before → after), one per rule you broke on purpose with the reason, and the checks you ran with their results.
- Reviewing: the stock list, the findings table, problems no rule covers, and the checks you couldn't run.