Skip to content

Spacing

The Six Webcomponents library uses a consistent spacing scale to maintain visual harmony throughout the interface. These spacing tokens can be used for margins, paddings, gaps, and other spatial relationships.

CSS VariableValuePreview
--six-spacing-xxx-small0.125rem (2px)
--six-spacing-xx-small0.25rem (4px)
--six-spacing-x-small0.5rem (8px)
--six-spacing-small0.75rem (12px)
--six-spacing-medium1rem (16px)
--six-spacing-large1.25rem (20px)
--six-spacing-x-large1.75rem (28px)
--six-spacing-xx-large2.25rem (36px)
--six-spacing-xxx-large3rem (48px)
--six-spacing-xxxx-large4.5rem (72px)

Example Usage

css
.my-element {
  margin-bottom: var(--six-spacing-medium);
  padding: var(--six-spacing-small);
}