Variables

Spacing scale, border-radius scale, transitions, z-index layers, breakpoints, font sizes — the non-colour tokens.

≈ 2 min read 333 words Updated 2026-08-23

On this page

abstracts/_variables.scss holds every non-colour token Bifrost components reference: spacing, radii, transitions, z-indices, breakpoints, font sizes. Components @use "../abstracts/variables" as v; and reach for tokens like v.$spacing-md instead of hardcoding rem values.

Source: themes/bifrost/sass/abstracts/_variables.scss

Spacing scale#

4px-based. Use this scale for padding, margin, gap.

TokenValue
$spacing-2xs0.25rem
$spacing-xs0.5rem
$spacing-sm0.75rem
$spacing-md1rem
$spacing-lg1.5rem
$spacing-xl2rem
$spacing-2xl3rem
$spacing-3xl4rem

Border radius#

TokenValueUse
$border-radius-xs0.25remSmall inline pills, chips.
$border-radius-sm0.375remCode blocks, inline highlights.
$border-radius-md0.5remStandard buttons, inputs.
$border-radius-lg0.75remCards, modals.
$border-radius-xl1remLead cards, premium surfaces.
$border-radius-full50pxPill / badge shapes.

Transitions#

TokenValue
$transition-fast0.1s
$transition-base0.2s
$transition-slow0.3s
$transition-slower0.5s
$transition-defaultall 0.3s ease
$transition-transformtransform 0.3s cubic-bezier(0.4, 0, 0.2, 1)

Z-index layers#

TokenValueUse
$z-navbar50Site navbar.
$z-dropdown55Open navbar menus.
$z-modal60Modal dialogs.
$z-tooltip70Tooltips (above modals).
$z-toast80Snackbar / toast notifications.

(Some components like the keyboard-shortcuts modal use higher values deliberately to sit above other modals; reach for z-toast + n, not a naked 9999.)

Breakpoints#

TokenValue
$breakpoint-sm640px
$breakpoint-md768px
$breakpoint-lg1024px
$breakpoint-xl1280px

These are reference values — Bifrost uses inline @media (max-width: …) queries with the literal pixel values for clarity, rather than wrapping them in mixins.

Font sizes#

TokenValueUse
$font-size-xs0.75remChips, captions, badges.
$font-size-sm0.875remSecondary text.
$font-size-base1remBody text.
$font-size-lg1.125remEmphasis.
$font-size-xl1.25remSection headings.
$font-size-2xl1.5remCard titles.
$font-size-3xl1.875remPage titles inside content.

Layout#

TokenValueUse
$viewport-max-width1400pxContent container max-width.
$hairline-width1pxHairline border width.

Edit this page on GitHub