Spacing

The ws spacing scale, the control and form sizes, and how they map to classes.

Spacing is one numbered scale, --spacing-ws-0 to --spacing-ws-28. Tailwind builds every spacing utility from it, so the same step works for padding, margin, gap, width, height and inset: p-ws-4, gap-ws-2, mt-ws-6, w-ws-12.

<div className="flex flex-col gap-ws-3 p-ws-5">…</div>

The numbers are steps, not multiples of a base unit. p-ws-4 is 0.375rem; Tailwind’s own p-4 is 1rem. Both scales are available side by side, so a missing -ws- still compiles and gives a different size. Components use the ws scale.

Scale

Each step points at a --ws-space-* primitive. Override the step (--spacing-ws-4) to change one class, or the primitive to change every token built on it. The bars are drawn with the token, so an override shows here.

Class and variableValuePrimitiveSample
p-ws-0
--spacing-ws-0
0rem--ws-space-0
p-ws-1
--spacing-ws-1
0.0625rem--ws-space-25
p-ws-2
--spacing-ws-2
0.125rem--ws-space-50
p-ws-3
--spacing-ws-3
0.25rem--ws-space-100
p-ws-4
--spacing-ws-4
0.375rem--ws-space-150
p-ws-5
--spacing-ws-5
0.5rem--ws-space-200
p-ws-6
--spacing-ws-6
0.625rem--ws-space-250
p-ws-7
--spacing-ws-7
0.75rem--ws-space-300
p-ws-8
--spacing-ws-8
0.875rem--ws-space-350
p-ws-9
--spacing-ws-9
1rem--ws-space-400
p-ws-10
--spacing-ws-10
1.125rem--ws-space-450
p-ws-11
--spacing-ws-11
1.25rem--ws-space-500
p-ws-12
--spacing-ws-12
1.5rem--ws-space-600
p-ws-13
--spacing-ws-13
1.75rem--ws-space-700
p-ws-14
--spacing-ws-14
2rem--ws-space-800
p-ws-15
--spacing-ws-15
2.25rem--ws-space-900
p-ws-16
--spacing-ws-16
2.5rem--ws-space-1000
p-ws-17
--spacing-ws-17
2.75rem--ws-space-1100
p-ws-18
--spacing-ws-18
3rem--ws-space-1200
p-ws-19
--spacing-ws-19
3.5rem--ws-space-1400
p-ws-20
--spacing-ws-20
4rem--ws-space-1600
p-ws-21
--spacing-ws-21
4.5rem--ws-space-1800
p-ws-22
--spacing-ws-22
5rem--ws-space-2000
p-ws-23
--spacing-ws-23
5.5rem--ws-space-2200
p-ws-24
--spacing-ws-24
6rem--ws-space-2400
p-ws-25
--spacing-ws-25
7rem--ws-space-2800
p-ws-26
--spacing-ws-26
8rem--ws-space-3200
p-ws-27
--spacing-ws-27
9rem--ws-space-3600
p-ws-28
--spacing-ws-28
10rem--ws-space-4000

Control sizes

--spacing-ws-control-* is the square size of small parts inside a component: icons, checkbox and radio boxes, avatars. Components use them as size-ws-control-md, w-ws-control-sm or h-ws-control-sm.

Class and variableValueSample
size-ws-control-xs
--spacing-ws-control-xs
0.75rem
size-ws-control-sm
--spacing-ws-control-sm
1rem
size-ws-control-md
--spacing-ws-control-md
1.25rem
size-ws-control-lg
--spacing-ws-control-lg
1.5rem
size-ws-control-xl
--spacing-ws-control-xl
1.75rem
size-ws-control-xxl
--spacing-ws-control-xxl
2rem

Form sizes

--spacing-ws-forms-* is the height of a form control or button at each size: xs, sm, md, lg. Use h-ws-forms-md to line up your own element with a medium input; components also use these for square widths (w-ws-forms-sm on an icon button).

Class and variableValueSample
h-ws-forms-xs
--spacing-ws-forms-xs
1.5rem
h-ws-forms-sm
--spacing-ws-forms-sm
2rem
h-ws-forms-md
--spacing-ws-forms-md
2.5rem
h-ws-forms-lg
--spacing-ws-forms-lg
3rem

Change it

The tokens are CSS variables, so a stylesheet loaded after Wideset’s changes every class that reads them:

:root {
  --spacing-ws-forms-md: var(--ws-space-900); /* taller medium inputs and buttons */
}

See Theming for where to load overrides, and Tokens for every variable in one list.