System
Density
Task density, control heights, surfaces.
Meridian — density.md
Density, spacing & shell rhythm. Ranking:
influences.md.
Primary absorb: Polaris task density + Fluent 4px / density multipliers + Cursor compact chrome + Linear content-over-chrome.
Typed source of truth:lib/design/shell.ts→shellRhythm(mirrored inapp/globals.css).
1. Laws
- Density follows the task — not a global aesthetic (Polaris).
- One component, many densities —
data-surfaceremaps CSS vars; no forked Button. - 4px grid — heights and pads on Fluent ramp (Layout).
- Indexes dense; detail breathes — space groups related fields.
- Touch floor 44px on
mobile. - Desktop chrome may go 28px — keyboard-first.
- No off-scale pixels — use
h-control/h-row/shell-pad/shell-gap/type-*.
2. Control height scale
| Token | px | Use |
|---|---|---|
--control-h-xs | 24 | Desktop icon buttons |
--control-h-sm | 28 | Compact chrome |
--control-h | 32 | Application default (remapped per surface) |
--control-h-md | 36 | Marketing secondary |
--control-h-lg | 40 | Marketing primary CTA |
--control-h-touch | 44 | Mobile targets |
--row-h | surface | Index / list rows |
--surface-pad / --surface-gap | surface | Shell interior rhythm |
3. Surface remaps (shellRhythm)
| Surface | control | row | pad | gap | type ui |
|---|---|---|---|---|---|
| application | 32 | 40 | 20 | 12 | 14 |
| desktop | 28 | 32 | 12 | 8 | 13 |
| marketing | 36 | 44 | 24 | 20 | 16 |
| mobile | 44 | 52 | 16 | 12 | 16 |
Utilities: .h-control · .h-row · .shell-pad · .shell-gap · .shell-stack · .type-ui · .type-row · .type-meta · .type-label.
4. When to go denser / looser
| Denser | Looser |
|---|---|
| Tables, triage, file trees | Forms, onboarding, empty states |
| Command palette results | Marketing stages |
| Agent event lists | Reading prose |
5. Optical density tips (Linear)
- Align icons and labels — perceived density drops when misaligned
- Soften borders before removing information
- Prefer selected wash over heavy separators
6. Agent checklist
- Correct
data-surfaceon the shell root - Heights via
h-control/h-row/--control-h* - Type via
type-ui/type-row/type-meta/type-label - Touch targets on mobile (44px floor)
- No
h-[NNpx]/ off-scaletext-[NNpx]/p-[NNpx] -
npm run check:shell+check:design
7. Proof
Live matrix: /meridian/theme#shell-rhythm → ShellRhythmProof.