Spacing
To ensure visual consistency and a cohesive user experience across all platforms, we are adopting a standardized spacing and radius system. This document outlines our approach, which primarily uses a 4px spacing scale (measured in rem units) with adjustments for mobile and desktop devices.
Our spacing system utilizes named tokens that define specific rem values. These values differ slightly between mobile and desktop to optimize readability and visual hierarchy on different screen sizes. Our base rem unit is set to 1rem = 16px. The spacing tokens follow this convention: spacing-[size]. Sizing follows t-shirt sizing naming.
While geometric precision is our starting point, we place a higher emphasis on optical alignment. This means that, although our measurements are based on a 4px grid, we make small adjustments when necessary to ensure that elements visually align in a way that feels natural and comfortable to the eye.
By combining a systematic approach with thoughtful visual fine-tuning, our spacing and radius guidelines help maintain consistency across all interfaces while also enhancing the overall user experience.
Tokens
token-name
breakpoint
px
rem
spacing-none
mobile-breakpoints
0px
0rem
desktop-breakpoints
0px
0rem
spacing-4x-small
mobile-breakpoints
2px
0.125rem
desktop-breakpoints
4px
0.25rem
spacing-3x-small
mobile-breakpoints
4px
0.25rem
desktop-breakpoints
6px
0.375rem
spacing-2x-small
mobile-breakpoints
6px
0.375rem
desktop-breakpoints
8px
0.5rem
spacing-x-small
mobile-breakpoints
8px
0.5rem
desktop-breakpoints
12px
0.75rem
spacing-small
mobile-breakpoints
12px
0.75rem
desktop-breakpoints
16px
1rem
spacing-medium
mobile-breakpoints
16px
1rem
desktop-breakpoints
20px
1.25rem
spacing-large
mobile-breakpoints
20px
1.25rem
desktop-breakpoints
24px
1.5rem

spacing-x-large
mobile-breakpoints
24px
1.5rem

desktop-breakpoints
32px
2rem

spacing-2x-large
mobile-breakpoints
32px
2rem

desktop-breakpoints
48px
3rem

spacing-3x-large
mobile-breakpoints
48px
3rem

desktop-breakpoints
56px
3.5rem

spacing-4x-large
mobile-breakpoints
56px
3.5rem

desktop-breakpoints
64px
4rem

spacing-5x-large
mobile-breakpoints
64px
4rem

desktop-breakpoints
72px
4.5rem

spacing-6x-large
mobile-breakpoints
72px
4.5rem

desktop-breakpoints
84px
5.25rem

spacing-7x-large
mobile-breakpoints
84px
5.25rem

desktop-breakpoints
96px
6rem
