Skip to main content
UI/UX foundations critical

Spacing & Sizing Best Practices

Spacing scales, touch targets, gap vs margin, and logical properties based on WCAG 2.2, Apple HIG, Material Design 3, and CSS best practices.

Difficulty
beginner
Read time
1 min read
Version
v1.0.0
Confidence
established
Last updated

Quick Reference

Use 4px or 8px spacing scale (4, 8, 12, 16, 24, 32, 48, 64). Touch targets minimum 44x44px (Apple) or 24x24px (WCAG AA). Use CSS gap for sibling spacing, margin for section spacing. Use logical properties (margin-inline, padding-block) for RTL support.

Use When

  • Setting up spacing tokens for a design system
  • Deciding padding and margins for components
  • Sizing interactive elements like buttons
  • Creating consistent whitespace
  • Supporting RTL languages

Skip When

  • Working on print design
  • Pixel-art or game UI with custom grid

Spacing & Sizing Best Practices

Spacing scales, touch targets, gap vs margin, and logical properties based on WCAG 2.2, Apple HIG, Material Design 3, and CSS best practices.

Tags

spacing sizing touch-targets accessibility grid gap logical-properties

Discussion