CSS Variables

The design system includes primitive and semantic tokens. Utilize semantic tokens whenever possible. Primitive vars are the building blocks for semantic vars, allowing for cleaner abstraction.


Semantic tokens

Recognizable by the following naming conventions, which correlate to variable names in Figma:


Text and Fonts

--text-font-size-<size>

--text-weight-string-<style>

--font-text-<style>

--font-size-headline-<size>

--font-size-body-<size>

--font-size-caption

--font-familiy-<type>


Radius

--radius-<style>


Spacing

--spacing-<size>


Colors

Variables for generic colors (like dialogs and errors):

--colors-accent-1-<num>

--colors-accent-2-<num>

--colors-error-<num>

--colors-warning-<num>

--colors-info-<num>

--colors-success-<num>

--colors-surface-error

--colors-surface-toggle-disabled


Brand-specific colors (Ops):

--colors-border-primary

--colors-overlay-default

--colors-primary-<num>

--colors-focus-ring-<style>

--colors-surface-<type>

--colors-surface-<type>-<style>

--colors-border-<style>

--colors-border-<type>-<style>

--font-text-<type>

--font-text-<type>-<style>


Primitive variables

Do not use outside of the design_system/assets/css/design_system/variables.css file.

Recognizable by the following naming conventions:


Size

--size-<num>

--size-full


Colors

These variables all start with --color (singular).

--color-<type>-<color>-<num>


Text and Fonts

--text-font-family-<name>

--text-line-height-<num>

--text-weight-number-<num>


Shadow

--shadow-<size>