GC Design System Styles
Home Start to use Page templates overview Basic page Components overview Breadcrumbs Button Card Checkboxes Container Date input Date modified Details Error message Error summary Fieldset File uploader Footer Grid Header Heading Icon Input Language toggle Link Notice Pagination Radios Screenreader-only Search Select Side navigation Signature Stepper Text Textarea Theme and topic menu Top navigation CSS shortcuts overview Reset styles Responsive layout State Box sizing Container sizing Display Overflow Position Visibility Font Font family Font size Font style Font weight Line height Link colour Link size Link text decoration List style Text align Text colour Text overflow Text transform Word break Margin Padding Align content Align items Align self Flex Flex direction Flex grow Flex shrink Flex wrap Gap Grid columns Grid rows Justify content Justify items Justify self Order Place content Place items Place self Background colour Border colour Border radius Border style Border width Icon names Icon size Image Cursor Pointer events Transition Styles overview Design tokens Colour tokens Spacing tokens Typography tokens Contact us Get involved Find a demo

Spacing tokens

Spacing tokens help position elements onscreen and in components.

Spacing tokens and accessibility

GC Design System components meet level AAA of the Web Content Accessibility Guidelines (WCAG 2.1) for both tap targets and visual presentation.

Spacing establishes visual hierarchy for content and guides focus to certain elements. Information that's too densely packed is difficult to read and increases cognitive load.

Vertical rhythm and rem spacing sizes

GC Design System spacing is based on vertical rhythm and calculated with the help of a base size.

Vertical rhythm aligns text to evenly spaced horizontal lines in repeated patterns. Consistent vertical spacing helps make content easier to scan, read, and understand. Spacing sizes are configured with rem units. All spacing sizes are relative to a base size of 1.25rem (20px) and what we use to calculate all typography and spacing values.

Global spacing tokens

Alignment and spacing

  • Use smaller spacing tokens to group related concepts together.
  • Use larger spacing tokens to separate elements into logical groups.
  • Whenever possible, line objects up both vertically and horizontally.
PreviewToken namePixelRem
--gcds-spacing-00px0rem
--gcds-spacing-252px0.125rem
--gcds-spacing-504px0.25rem
--gcds-spacing-756px0.375rem
--gcds-spacing-1008px0.5rem
--gcds-spacing-12510px0.625rem
--gcds-spacing-15012px0.75rem
--gcds-spacing-17514px0.875rem
--gcds-spacing-20016px1rem
--gcds-spacing-22518px1.125rem
--gcds-spacing-25020px1.25rem
--gcds-spacing-30024px1.5rem
--gcds-spacing-35028px1.75rem
--gcds-spacing-40032px2rem
--gcds-spacing-45036px2.25rem
--gcds-spacing-50040px2.5rem
--gcds-spacing-55044px2.75rem
--gcds-spacing-60048px3rem
--gcds-spacing-65052px3.25rem
--gcds-spacing-70056px3.5rem
--gcds-spacing-75060px3.75rem
--gcds-spacing-80064px4rem
--gcds-spacing-85068px4.25rem
--gcds-spacing-90072px4.5rem
--gcds-spacing-95076px4.75rem
--gcds-spacing-100080px5rem
--gcds-spacing-105084px5.25rem
--gcds-spacing-110088px5.5rem
--gcds-spacing-115092px5.75rem
--gcds-spacing-120096px6rem
--gcds-spacing-1250100px6.25rem

Help us improve

Have questions or a request? Give feedback on our contact form.

Something's wrong? Raise it through GitHub with an account. You'll have access to the team's direct responses, progress made on your issue, and issues raised by others.

Give feedback Report an issue on GitHub

2024-03-04