Skip to content

Spacing

Padding, margins and white-space between elements.

Overview

Spacing is commonly referred to as white space. It is the space between elements and defines the value for common properties such as padding and margin.

Scale

Nebula spacing is based on a 4px scale. This means each token is a multiple of 4. A pixel value can easily be converted to it's token form by dividing by 4. e.g. A 32px space, would be space.8.

Additionally we also include some "semantic" values for specific cases - between form fields for example.

Theme tokens
TokenDefault Value
space.10.4rem
space.20.8rem
space.31.2rem
space.41.6rem
space.52rem
space.62.4rem
space.72.8rem
space.83.2rem
space.93.6rem
space.104.0rem
space.114.4rem
space.124.8rem
space.betweenFormFields1.6rem
space.betweenButtons0.8rem