Spacing

One scale for every gap, padding and offset in the system. The step is not linear on purpose: near zero the eye distinguishes two pixels, at forty it does not, and a linear scale would spend half its values where nobody can tell them apart.

  • A component never invents a gap. If a value is missing from the scale, that is a question to the scale, not a reason for a magic number.

Layout: spacing scale

TokenValue
--gr-space-0--gr-space-00px
--gr-space-1--gr-space-14px
--gr-space-2--gr-space-28px
--gr-space-3--gr-space-312px
--gr-space-4--gr-space-416px
--gr-space-5--gr-space-520px
--gr-space-6--gr-space-624px
--gr-space-8--gr-space-832px
--gr-space-10--gr-space-1040px
--gr-space-12--gr-space-1248px
--gr-space-16--gr-space-1664px
--gr-space-20--gr-space-2080px
--gr-space-24--gr-space-2496px
--gr-space-32--gr-space-32128px
--gr-space-40--gr-space-40160px
--gr-space-48--gr-space-48192px
--gr-space-64--gr-space-64256px

Role descriptions ship with the package in Russian and are not shown here yet. Translating them is a decision of its own — see ADR-0003.

Source: @feugene/granularity 0.41.0, tokens/*.json