Craft03/05
Interface details that add up
Most of these details go unnoticed one at a time. Together they decide whether an interface feels careful. (STD-visual-details-50)
Each rule is an OpenDesigner house standard or one of its accessibility floors, with its source. The drawings use this site's own type and colors, and their measurements are real.
Letter spacing and line height change with size
Never use one letter spacing for every size, and set line height inversely to size. (STD-visual-details-05, STD-visual-details-06) Capitals need more room, or they look cramped. (STD-visual-details-04)
| Text | Letter spacing | Line height |
|---|---|---|
| Large headings | tightened, for example -0.02em | tight, for example 1.05 |
| Body text | near 0 | looser, for example 1.5 |
| Small text | slightly more | |
| Small capital labels | +0.06em in OpenDesigner's tokens; capitals are never tightened |
Build hierarchy from weight, size and line height together, not size alone. (STD-visual-details-07)
Keep lines of body text to about 65 characters. (STD-visual-details-01)
- 1Large text: tighter. Letter spacing -0.02em, line height 1.05. Big letters drift apart, so they are pulled in.
- 2Capitals: looser. Wider than the same words in sentence case. This label uses 0.07em.
- 3Body: neutral. Letter spacing near 0, line height 1.5, lines no wider than about 65 characters.
Source: the apple-design skill in emilkowalski/skills, and Emil Kowalski's essay Agents with taste for capitals and line length.
Numbers that change in place
Use tabular digits, font-variant-numeric: tabular-nums, for price columns and numbers that update, like timers and counters. Every digit has the same width, so columns line up and a changing number doesn't shift. (STD-visual-details-02) When a number animates, use the NumberFlow library instead of re-rendering the text. (STD-visual-details-59)
Digits of different widths
The narrow 1s pull some amounts to the right, so the decimal points no longer line up and the column is hard to scan.
Tabular digits
Every digit takes the same width, so the decimal points sit on one line and a changing number does not jiggle.
Source: Emil Kowalski's Agents with taste and the animation-vocabulary and pick-ui-library skills in emilkowalski/skills.
Small habits in text
Write the ellipsis as one character (…), never three periods. (STD-visual-details-03) Underline only links, so an underline always means "you can click this". (STD-visual-details-09) Emphasize interface text with weight, not italics. (STD-visual-details-08)
Print habits in an interface
Three periods instead of an ellipsis, an underline on words that are not a link, and italics for emphasis.
Interface habits
One ellipsis character, weight for emphasis, and underlines kept for links, so an underline always means “you can click this”.
Source: Emil Kowalski's Agents with taste.
Soft edges, not hard lines
Separate surfaces with a semi-transparent shadow rather than a solid, opaque border. (STD-visual-details-14)
A solid, opaque border
A flat, opaque gray line draws the same hard box around each card, whatever sits behind it.
A semi-transparent shadow
A faint ring of the ink color plus a soft drop. The edge is partly see-through, so it blends with whatever is behind it.
box-shadow: 0 0 0 1px rgb(34 36 40 / 0.13), 0 1px 2px rgb(34 36 40 / 0.08), 0 10px 24px -12px rgb(34 36 40 / 0.34);
Under a sticky header, fade the edge instead of drawing a permanent line, and only where content passes under it. (STD-visual-details-15)
A hard line under the header, always
The 1 px divider is there even when nothing is underneath, and it cuts the scrolling content with a sharp edge.
A soft edge where content passes under
The header is translucent and a short fade appears only where content slides beneath it. No permanent line.
Never place one light, see-through surface on another: text on stacked translucent layers is hard to read. (STD-visual-details-18)
Source: the README and the apple-design skill in emilkowalski/skills.
Targets and focus, measured
| Target | At least | Source |
|---|---|---|
| Touch, iOS | 44 × 44 pt | STD-mobile-touch-09 |
| Touch, Android | 48 dp | STD-mobile-touch-09 |
| Touch, web | 44 px | STD-mobile-touch-09 |
| Any web target, mouse or finger | 24 × 24 CSS px | Accessibility floor, WCAG 2.2 2.5.8 Target Size (Minimum) |
When the drawn control is smaller, grow its hit area, with a pseudo-element on the web or hitSlop in React Native, never the drawing. (STD-mobile-touch-09)
Every focusable element shows a focus ring, 2 px wide, 2 px from the element, with at least 3:1 contrast against its surroundings: a floor from 2.4.7 Focus Visible and 1.4.11 Non-text Contrast.
Set the text in inputs to 16 px or more, or iOS Safari zooms the page on focus and doesn't zoom back. Never turn off pinch zoom to stop it. (STD-mobile-touch-11, STD-accessibility-motion-27)
- 1Icon button. The icon is drawn at 20 px. Its hit area (dashed) grows to 44 px for touch with a pseudo-element, never by growing the icon. 24 by 24 px (green) is the floor for every web target.
- 2Focus ring. 2 px wide, 2 px from the edge, and at least 3:1 against what is around it.
- 3Input text. 16 px or larger, so iOS Safari does not zoom the page when the field gets focus.
Source: the mobile-native, animate-expo and apple-design skills in emilkowalski/skills, and Emil Kowalski's Agents with taste.
Color: contrast and meaning
Text on a fill needs at least 4.5:1 contrast, or 3:1 when it is large. OpenDesigner uses the WCAG 2 formula and never rounds up, so 4.49:1 fails. An accessibility floor, from 1.4.3 Contrast (Minimum).
Put color on solid layers, not see-through ones. Over a translucent surface, use higher-contrast text, a slightly heavier weight and a little more letter spacing. (STD-visual-details-21, STD-visual-details-13)
Text that sinks into its fill
Dark text on bright cobalt, white on a pale tint, white on mid gray. Measured, none reaches 4.5:1, the floor for body text.
#222428 on #2338ff2.28:1
#ffffff on #e3ecff1.18:1
#ffffff on #8087933.61:1
Each fill with its own text color
Each fill gets a text color chosen for it: white on the strong fill, a dark shade of the same hue on the pale ones. Every pair clears 4.5:1.
#ffffff on #2338ff6.81:1
#1c31ce on #e3ecff7.44:1
#00652c on #ebf7ed6.57:1
Never pair pure white with pure black. Use an off-black such as #111111 with white, or an off-white with black. (STD-visual-details-66)
Keep the colors people already know: green for success, red for errors, amber for pending, blue for information. (STD-visual-details-65)
Source: the apple-design skill in emilkowalski/skills, for translucent surfaces. The last two are OpenDesigner's own house rules.
Build from the tokens
Build from the project's existing tokens, the named values of the system, and extend them when something is missing. Never hand-type or approximate a value, and never start a second, parallel set. (STD-visual-details-26)
Make every spacing, timing and alignment value a choice you can defend. (STD-visual-details-27) Jittery scrolling, misaligned icons or layouts that break on rotation read as carelessness. (STD-visual-details-28)
Source: the prototype, animate and review skills in emilkowalski/skills, and the apple-design skill.
Where these rules come from
The standards file lists each standard with its sources, and Who OpenDesigner learns from describes every source. OpenDesigner is not affiliated with or endorsed by the people it cites.