Skip to main content

Space and shape

On its own page, in English and Arabic

Space​

One 4px step (--al-space-1 = 0.25rem), with two half-steps for fine adjustments:

TokenValueTypical use
space-0-52pxBetween an icon and its badge
space-14pxInside badges; between a label and its control
space-1-56pxBetween an icon and its text
space-28pxBetween items in a tight stack; hint below a field
space-312pxBetween controls in a cluster; field padding
space-416pxThe default gap; card padding (small)
space-520pxCard padding
space-624pxBetween groups in a form
space-832pxBetween sections in an app view
space-12, space-1648px, 64pxLarge separations on a website
space-section48–144px, fluidAbove and below a website section
space-gutter16–64px, fluidThe page's side padding

hunt had 91 distinct paddings; spacing now comes from this list only. Space is set by layout primitives (.al-stack, .al-cluster, .al-grid) through gap, not by margins on components, so a component never pushes on what's around it.

Shape​

  • Radius: radius-sm (2px) on everything: buttons, inputs, cards, dialogs. radius-md (4px) only for the rounded data-end of a chart bar. radius-full for pills (switches, counts, avatars).
  • Borders: border-hairline (1px) everywhere; border-focus (2px) for the focus outline, the selected tab underline and status edges.
  • No shadows, anywhere. The only exception is none.

Sizes​

TokenValueFor
size-control-md40pxButtons and fields
size-control-sm32pxSmall buttons and dense tables
size-target-min24pxThe minimum for any target (WCAG 2.5.8)
size-target-touch44pxTouch-first surfaces (mobile toolbars)
size-icon18pxIcons beside text
size-measure65chReading width
size-page1200pxThe page's content width
size-dialog-sm, -md480px, 768pxDialog widths
size-sidebar, -collapsed224px, 60pxThe app sidebar

Breakpoints​

Three, all in rem so they follow the reader's font size: sm 40rem (640px), md 52rem (832px), lg 64rem (1024px). Most layout needs none of them: .al-grid reflows by its minimum column width. hunt's six breakpoints in two units collapse onto these three.