Design Token

Spacing and Sizing

Apply consistent sizes across your application.

Reference

TokenPixelsREMRepresentation
1x4px0.25rem
2x8px0.5rem
3x12px0.75rem
4x16px1rem
5x20px1.25rem
6x24px1.5rem
7x28px1.75rem
8x32px2rem
9x36px2.25rem
10x40px2.5rem
11x44px2.75rem
12x48px3rem
13x52px3.25rem
14x56px3.5rem
15x60px3.75rem
16x64px4rem
17x68px4.25rem
18x72px4.5rem
19x76px4.75rem
20x80px5rem
21x84px5.25rem
22x88px5.5rem
23x92px5.75rem
24x96px6rem
25x100px6.25rem
26x104px6.5rem
27x108px6.75rem
28x112px7rem
29x116px7.25rem
30x120px7.5rem
31x124px7.75rem
32x128px8rem
...

The spacing and sizing system is constructed using a base unit of 4 pixels.


Basic usage

Apply a spacing

Apply the defined spacing variables using the inherited syntaxes margin-left, margin-right, margin-top, margin-bottom, margin-x, margin-y, margin, margin-inline-start, margin-inline-end, margin-inline, padding-left, padding-right, padding-top, padding-bottom, padding-x, padding-y, padding, padding-inline-start, padding-inline-end, padding-inline, text-underline-offset, top, bottom, left, right, inset, transform, border-spacing, stroke-dashoffset, x, y, cx, cy, column-gap, row-gap, gap, outline-offset, scroll-margin-left, scroll-margin-right, scroll-margin-top, scroll-margin-bottom, scroll-margin-x, scroll-margin-y, scroll-margin, scroll-padding-left, scroll-padding-right, scroll-padding-top, scroll-padding-bottom, scroll-padding-x, scroll-padding-y, scroll-padding, shape-margin.

<div class="mt:1x p:4x"></div>
Design Token
Colors

Customizing color variables or starting with the crafted palette.

© Aoyue Design LLC.