Brik Design System
Foundation

Size

Dimensional constraints for containers, breakpoints, and elements.

Size tokens define dimensional constraints — how big things can be, where the layout breaks, and how wide content columns sit within a viewport.

Size scale

--size-0
0px
--size-25
1px
--size-50
2px
--size-100
4px
--size-150
6px
--size-200
8px
--size-300
12px
--size-400
16px
--size-500
20px
--size-600
24px
--size-700
28px
--size-800
32px
--size-900
36px
--size-1000
40px
--size-1100
44px
--size-1200
48px
--size-1300
48px
--size-1400
52px
--size-1500
56px
--size-1600
60px
--size-1700
64px
--size-1800
72px
--size-1900
80px
--size-2000
84px
--size-2100
88px
--size-2200
96px

Content widths

One ladder caps every horizontal width on a page — text column and band alike — and each rung carries exactly one role, stated in its name. A -text- rung caps a text column; a bare rung sizes a band (ADR-041). Apply with max-width on the element that owns the column.

TokenCSS VariableValueCapsUse for
Text XS--bds-content-width-text-xs448pxtextShort intro — eyebrow + one-line title
Text SM--bds-content-width-text-sm600pxtextSection intro — title + description (the default)
Text MD--bds-content-width-text-md720pxtextLong-form prose, rich-text body
Narrow--bds-content-width-sm640pxbandNarrow band, focused forms
Default--bds-content-width-md800pxbandStandard body sections
Wide--bds-content-width-lg1024pxbandFeature sections, content grids
XL--bds-content-width-xl1280pxbandHero bands, wide layouts
Full--bds-content-width-full100%bandFull-bleed (use sparingly)

The text rungs interleave numerically with the band rungs (600 < 640 < 720 < 800). Pick a rung by its role, which the name states — never by sorting the ladder.

/* a band */
.content-section {
  max-width: var(--bds-content-width-md);
  margin-inline: auto;
}

/* the text column inside it */
.article-body {
  max-width: var(--bds-content-width-text-sm);
}

A column has one content width and one left edge: the element that owns the column sets the width, and blocks nested inside it never re-cap themselves. See Page Grid → The column rule, which is where the horizontal-axis standard lives — this page is the token catalog.

There used to be a second --measure-sm/md/lg ladder in ch for the text column. ADR-041 retired it into the -text- rungs above at the px widths it already rendered; the old names ship one more minor as deprecated aliases, then drop — don't reach for them in new code. Nothing in BDS scales body type — --body-md is a fixed 16px, only --display-fluid-* clamps, and [data-mode-spacing] never touches font-size — so ch never tracked anything, while two siblings sharing one ch cap at different type sizes resolved to two different pixel widths.

Screen breakpoints

BDS defines five canonical breakpoints. All five are Figma variables in the ❖ Brik Foundations breakpoint collection, and the CSS custom properties (--breakpoint-*) are generated from them. For CSS @media rules inside BDS, use the --bds-up-* / --bds-down-* custom media below; in TS, import mediaQueries (or breakpoints) from @bds-tokens — CSS custom properties (var()) cannot be used inside @media().

NameCSS VariableValue
Mobile--bds-breakpoint-mobile320px
Tablet--bds-breakpoint-tablet768px
Desktop--bds-breakpoint-desktop1024px
Wide--bds-breakpoint-wide1280px
Wider--bds-breakpoint-wider1440px

--breakpoint-web no longer exists. A sixth rung named web (1200px default / 800px compact / 1400px comfortable) was a legacy layout-width value, never a screen breakpoint, and was retired from the ❖ Brik Foundations library in #2604. Five is the whole ladder.

The --breakpoint-* CSS custom properties are reference-only by design (ADR-025 §4). CSS variables can't be read inside @media(), so real breakpoint logic goes through the TS exports below — which is why Token Anatomy → Named exceptions records zero var(--breakpoint-*) references anywhere. That is an intentional split, not dead weight: the CSS vars carry the values into Figma and the docs, the TS exports carry them into conditions.

The layout tier also reads three rungs — mobile, tablet and wider — at build time, as the widths where --page-inset and --section-padding-block hit their device values. Moving one of those rungs in Figma moves the tier's endpoint with it.

Using breakpoints in CSS

mediaQueries gives ready-made conditions, so a call site never re-derives one. up.<rung> is mobile-first (min-width); down.<rung> is the exclusive complement, stepped down 0.02px so up and down never both match at the boundary.

import { mediaQueries } from '@bds-tokens';

// In a CSS-in-JS context
const styles = {
  [`@media ${mediaQueries.up.desktop}`]: {
    display: 'grid',
    gridTemplateColumns: '1fr 2fr',
  },
};
/* In BDS component CSS — a breakpoint custom media, resolved to px at build time */
@media (--bds-up-desktop) {
  .sidebar-layout {
    display: grid;
  }
}

The names are --bds-up-<rung> (min-width, all five rungs) and --bds-down-<rung> (max-width, rung minus 0.02px; every rung except mobile). They live in tokens/custom-media.css, and postcss.config.mjs resolves each one to px, so dist/styles.css ships plain @media conditions — @custom-media is not Baseline in browsers. lint-tokens pins each definition to its --breakpoint-* rung and fails any literal px in an @media under components/ (ADR-044). Consumers are unaffected: they get the resolved px from dist.

Using breakpoints in JavaScript

import { mediaQueries } from '@bds-tokens';

const isDesktop = window.matchMedia(mediaQueries.up.desktop).matches;

breakpoints remains exported for the cases where you need the raw width — a sizes attribute, a layout calculation, a chart threshold:

import { breakpoints } from '@bds-tokens';

const px = parseInt(breakpoints.desktop, 10); // 1024

Element sizes

Fixed element dimensions — icons, dots, indicators — use the numeric --size-* scale. Values step in 4px increments above 8px.

--size-* and --space-* are two scales, not one — don't treat --size-400 and --space-400 as interchangeable. They share identical values on the low/mid steps (0 through 2100), but they diverge: --space-* adds half-steps (--space-250 = 10px, --space-350 = 14px, --space-450 = 18px) and runs higher (to --space-3000 = 176px), while --size-* tops out at --size-2200 = 100px — and at that shared index the two disagree (--space-2200 = 104px). Pick by intent: --size-* for a fixed element dimension (width/height of an icon, dot, indicator), --space-* for layout spacing (the primitive that --padding-* / --gap-* draw from). Verify the value in dist/tokens.css rather than assuming the same index matches.

TokenValue
--bds-size-502px
--bds-size-1004px
--bds-size-2008px
--bds-size-40016px
--bds-size-60024px
--bds-size-80032px
--bds-size-100040px

The scale runs --size-0 (0) through --size-2200 (100px).

Aspect ratio

--aspect-* feeds the aspect-ratio property, so a media box holds its shape as it scales — no padding-hack. Nine ratio primitives cover the common orientations, and four semantic aliases name the cases you reach for most.

TokenCSS VariableRatio
Square--bds-aspect-1-11 / 1
Landscape--bds-aspect-4-34 / 3
Portrait--bds-aspect-3-43 / 4
Landscape (photo)--bds-aspect-3-23 / 2
Portrait (photo)--bds-aspect-2-32 / 3
Portrait (social)--bds-aspect-4-54 / 5
Widescreen--bds-aspect-16-916 / 9
Vertical (stories)--bds-aspect-9-169 / 16
Ultrawide--bds-aspect-21-921 / 9

Four aliases point at the primitive above so intent reads at the call site — prefer them where one fits.

AliasResolves toNames
--bds-aspect-square--bds-aspect-1-1Avatars, thumbnails
--bds-aspect-cinema--bds-aspect-16-9Video, hero media
--bds-aspect-photo-landscape--bds-aspect-3-2Landscape photography
--bds-aspect-photo-portrait--bds-aspect-2-3Portrait photography
.media-frame {
  aspect-ratio: var(--bds-aspect-cinema);
}
  • Spacing tokens — the sibling --space-* scale for layout padding and gap (overlaps --size-* on the low/mid steps, diverges above — see the note above)
  • Typography → Icon sizes — semantic icon-size tokens
  • Page Grid — the horizontal-axis standard these --content-width-* tokens serve: the width-container recipe, the page inset, and the column rule

On this page

💬