Snaps an arbitrary numeric value to the nearest valid Tailwind size token.
The function tries progressively coarser series in order until a match is found:
Size
0
< 0.5
'px'
defaultSize
Numeric size to snap (in Tailwind spacing units, where 1 unit = 0.25 rem).
Fallback Size token used when no series produces a valid match.
The nearest valid Size token.
Snaps an arbitrary numeric value to the nearest valid Tailwind size token.
The function tries progressively coarser series in order until a match is found:
Size.0.< 0.5) — maps to the'px'token (1 px).defaultSizeif no series matches.