Skip to main content
Skip to design system navigation

SPACING-BORDERS

Spacing and border tokens live in app/css/theme.css.

Spacing

TokenUtility stepSize
Token--spacing-1Utility step1Size4px
Token--spacing-2Utility step2Size8px
Token--spacing-3Utility step3Size12px
Token--spacing-4Utility step4Size16px
Token--spacing-6Utility step6Size24px
Token--spacing-8Utility step8Size32px
Token--spacing-12Utility step12Size48px
Token--spacing-16Utility step16Size64px

SOURCE

<div style={{display:'grid',gap:'8px',width:'100%'}}>
    <span className="ds-space-bar" style={{width:'var(--spacing-1)'}} />
    <span className="ds-space-bar" style={{width:'var(--spacing-2)'}} />
    <span className="ds-space-bar" style={{width:'var(--spacing-3)'}} />
    <span className="ds-space-bar" style={{width:'var(--spacing-4)'}} />
    <span className="ds-space-bar" style={{width:'var(--spacing-6)'}} />
    <span className="ds-space-bar" style={{width:'var(--spacing-8)'}} />
    <span className="ds-space-bar" style={{width:'var(--spacing-12)'}} />
    <span className="ds-space-bar" style={{width:'var(--spacing-16)'}} />
  </div>

Golden-ratio spacing

Page rhythm steps through one set of tokens, each the previous times --phi (1.618). Gaps, padding, heading margins and the two-column splits on the guitar module, /links and the design system all read them.

TokenValueSize
Token--phi-space-1Value0.5remSize8px
Token--phi-space-2Value--phi-space-1 × --phiSize13px
Token--phi-space-3Value--phi-space-2 × --phiSize21px
Token--phi-space-4Value--phi-space-3 × --phiSize34px
Token--phi-text-1Value--text-xs × --phi-root (1.272)Sizeabout 15px
Token--phi-invValue1 ÷ --phiSize0.618
Token--phi-pair-columnsValueminmax(0, 1.618fr) minmax(0, 1fr)Size1.618 : 1

SOURCE

<div style={{display:'grid',gap:'8px',width:'100%'}}>
    <span className="ds-space-bar" style={{width:'var(--phi-space-1)'}} />
    <span className="ds-space-bar" style={{width:'var(--phi-space-2)'}} />
    <span className="ds-space-bar" style={{width:'var(--phi-space-3)'}} />
    <span className="ds-space-bar" style={{width:'var(--phi-space-4)'}} />
  </div>

SOURCE

<div style={{display:'grid',gridTemplateColumns:'var(--phi-pair-columns)',gap:'var(--phi-space-2)',width:'100%'}}>
    <span className="ds-space-bar" style={{height:'var(--phi-space-3)'}} />
    <span className="ds-space-bar" style={{height:'var(--phi-space-3)',opacity:0.5}} />
  </div>

Whole-page type does not use phi: a 1.618 step from a 12px base jumps to 19px and then 31px, too coarse for dense monospace text. Only --phi-text-1 takes the half step, for stat values. Pairs split 1.618 : 1 from 1024px and stack below it; on a phone every level is one centered column.

Touch target

--spacing-target is 44px, the minimum width and height of every control. --spacing-target-compact is 28px for dense, non-primary controls.

Layout tokens

Responsive tokens live in the :root block of app/css/theme.css; every page container reads them. The header, every page body and the footer share one safe zone: --measure-page wide, centered, with --space-gutter on each side, so their content starts and ends on the same vertical lines at every width.

TokenBelow 768pxFrom 768px
Token--space-gutterBelow 768pxclamp(16px, 4vw, 24px)From 768pxclamp(16px, 4vw, 24px)
Token--space-page-topBelow 768px32pxFrom 768px48px
Token--space-sectionBelow 768px32pxFrom 768px48px
Token--measure-pageBelow 768px1200px (the safe zone: header, every page, footer)From 768px1200px
Token--measure-readBelow 768px72ch (line length of text blocks, never a container width)From 768px72ch

Line heights: --leading-page-tight 1.1, --leading-page-snug 1.35, --leading-body 1.6. The page-scoped names keep Tailwind's built-in leading-tight and leading-snug scale intact.

Borders

TokenValueUse
Token--border-widthValue1pxUseBorders and dividers
Token--radius-noneValue0UseSharp controls
Token--radius-controlValue2pxUseMaximum control radius

The 2px ceiling is the control-radius token, not a claim that nothing round exists: the DAW mixer's 30px knobs are circular (rounded-full), and the traffic-light dots in WindowChrome are round dots rather than a radius token.

Focus

Keyboard focus uses :focus-visible with a 2px signal outline and a 2px offset. Never remove the outline without a replacement of equal contrast.