Foundations
The px laws
Sixteen rules that keep every screen from looking broken. Seven of them a machine can test — the checker in the corner runs them on any page, any theme, any width.
Test this page now
Runs every machine-checkable law on this page at its current width and theme. Resize the window or switch theme and run it again.
All 23 laws
- 01 The page never scrolls sidewaysChecked automatically
At any width from 320 to 2560px, nothing pushes past the edge of the screen.
- 02 Text never gets cut offChecked automatically
One-line labels end in “…”; longer text wraps; numbers and buttons never wrap.
- 03 Smallest text is 11pxChecked automatically
10px is allowed only for chart axis labels. Body text is 14px.
- 04 Everything you can press is big enoughChecked automatically
Visible controls are at least 32×32px (38px standard). On touch screens every control also gets an invisible 44×44px tap area, so it stays easy to hit without looking bigger.
- 05 Every control says what it doesChecked automatically
Icon-only buttons have a label; images have alt text; fields have a label.
- 06 Text is readableChecked automatically
4.5:1 contrast for content text. 3:1 for large numbers (24px and up) and for secondary labels in the muted grey — the Octagon OS look, a deliberate trade below WCAG AA for small grey labels.
- 07 Corners come from the scaleChecked automatically
6 · 9 · 10 · 12 · 13 · 14 · 16 · 22 · 26 · oval (99px). Inside corner = outside corner − the gap between them (a 26px card with 12px padding holds 14px corners).
- 08 Space has a rhythmChecked in review
Cards sit 16px apart (12px on phones). Card padding 24–26px (20px on phones). Page gutter 24px (8px on phones).
- 09 One line weightChecked in review
Borders and separators are 1px. Separators use the line colour, never a darker grey.
- 10 Things stack in one orderChecked in review
Page → raised cards → sticky headers → sidebar → menus → dialogs → notifications. Only the layer tokens are used.
- 11 Numbers line upChecked in review
Tabular figures everywhere; € with cents in totals; big figures carry a small € at 0.42em; a number never wraps.
- 12 One icon familyChecked in review
12–24px, 1.6 stroke, round ends, centred in a square hit area. No mixed icon sets.
- 13 One mark per list rowChecked in review
Every row in a list card starts with the same 36px tile (10px corners, 18px icon) naming what the row is about. Grey by default; a row carries one colour signal at most — the tile when it asks you to act, otherwise its status chip. Breakdown rows under a figure carry no tile.
- 14 Motion never moves the layoutChecked in review
Animate transform and opacity only. Hover changes colour, never position: buttons never lift.
- 15 Every press answers where you pressedChecked in review
A pressed control sinks a little. The result shows in the same place — a row turns done and offers Undo — and the other rows slide, never jump. A message pops up only when the result is somewhere else.
- 16 Every data block has four statesChecked in review
Loading, empty, error and filled — designed, not left blank.
- 17 Same meaning, same colourChecked in review
Blue = active or due · orange = planning · green = done or paid · red = overdue. Never decoration.
- 18 One thing is loudestChecked in review
Each screen has one hero — the biggest figure or the one dark card. Everything else steps down; two cards never shout at the same size.
- 19 Three levels, no moreChecked in review
Big figure → short label → detail. Size and weight make the order; colour does not.
- 20 The answer comes firstChecked in review
A card opens with its answer in one line (“14 of 18 at work”), and its rows only explain it.
- 21 Each card has its own shapeChecked in review
People show as faces, money as a figure, to-dos as rows with their one button. Two cards side by side never look like the same list.
- 22 Calm by defaultChecked in review
About 60% plain surface, 30% grey text, 10% colour — and that 10% only on what you must look at or press. No boxes inside boxes.
- 23 Reading stays comfortableChecked in review
Panels stop at 1360px; reading text stops at 72 characters per line.
On a phone: 9 more
- P1 Thumb firstChecked in review
The main places live in the bottom bar. A card’s main action sits at its foot, full width, at least 44px tall.
- P2 Fields never zoom the pageChecked automatically
Inputs, text boxes and selects use 16px text on a phone, so the phone never zooms in when you tap one.
- P3 Few wordsChecked in review
One line says what it is; one button says what to do. No second lines, no labels for what you can already see.
- P4 Only what is neededChecked in review
A list shows up to four rows, then “See all”. Breakdowns and secondary figures fold away behind one tap.
- P5 Menus rise from the bottomChecked in review
Menus and pickers open as a sheet at the bottom of the screen, rows 48px tall, closed by a tap outside.
- P6 Nothing hides under the edgesChecked in review
Nothing sits under the bottom bar, the notch or the home bar; the page ends above the bar.
- P7 One columnChecked in review
The page never scrolls sideways. Only chip rows slide, starting at the page edge.
- P8 The first screen answersChecked in review
Without scrolling: what is happening and what to do next.
- P9 Motion is quickChecked in review
Phone transitions stay at 300ms or less, and a swipe follows the finger.