Skip to content
HomeCobalt

Layout

Spacing uses Tailwind's scale in 4px steps. Controls of one size share one height, so a row of them lines up. The content column is at most 72rem wide. Its side padding is 16px on phones and 24px from 640px up. A page has a main column, plus a side column when the page needs one.

Tokens

  • --control-edgeThe outline of an unchecked box or an off track, 3:1 against the pagecolor-mix(in srgb, var(--foreground) 45%, transparent)
  • --line-iconAn icon's stroke at every size, the weight of a 14px medium label's stems1.5px
  • --line-focusThe keyboard focus outline's width2px
  • --focus-offsetThe gap between a control and its focus outline2px
  • --control-smA small button or field32px
  • --controlA button, a field, a pill36px
  • --control-lgA large button, a search field40px
  • --touchThe smallest target on a phone44px
  • --nav-itemThe height of a top nav link; set it on your root for a slimmer or taller barvar(--control)
  • --pageThe content column72rem
  • --gutterThe page's side padding from 640px up1.5rem
  • --rowA dense table row40px
  • --pad-cardA card's padding, and the gap between its parts24px
  • --pad-card-smA small card's padding, and the gap between its parts16px
  • --pad-popupBetween a menu, select, list or calendar popup's edge and its rows or days6px
  • --pad-composerBetween the message composer's edge and the buttons and pictures inside it6px

Rules