Spacing scale generator
Build a spacing scale in pixels and rem, preview each step and copy the scale as CSS custom properties.
| Token | px | rem | Preview |
|---|---|---|---|
--space-1 | 4 | 0.25 | |
--space-2 | 8 | 0.5 | |
--space-3 | 12 | 0.75 | |
--space-4 | 16 | 1 | |
--space-6 | 24 | 1.5 | |
--space-8 | 32 | 2 | |
--space-12 | 48 | 3 | |
--space-16 | 64 | 4 |
CSS variables
:root {
--space-1: 0.25rem;
--space-2: 0.5rem;
--space-3: 0.75rem;
--space-4: 1rem;
--space-6: 1.5rem;
--space-8: 2rem;
--space-12: 3rem;
--space-16: 4rem;
}