Skip to content
bitzorcas
中EN

Reference

Typography, Space, and Material

Design System 1.2 fonts, type scale, spacing, radius, elevation, motion, z-index, and density.

Last updated

Typography, Space, and Material

Font roles

TokenValueUse
--ref-font-uiInter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serifShell, forms, tables
--ref-font-document"Source Han Serif SC", "Noto Serif SC", Georgia, serifContracts and long-form legal documents
--ref-font-mono"SFMono-Regular", "JetBrains Mono", Consolas, monospaceCode, matter IDs, machine identifiers

Serif type never enters the application shell, forms, or data tables. Money, dates, statistics, and identifiers use tabular numbers.

Type scale

TokenpxUse
--ref-type-10010Non-critical desktop group label
--ref-type-20011Supporting metadata
--ref-type-30012Labels and states
--ref-type-40013Compact table body
--ref-type-50014Default UI body
--ref-type-60016Emphasized body
--ref-type-70018Section heading
--ref-type-80024Page heading
--ref-type-90028Important page heading
--ref-type-100036Identity heading, rarely used in work pages

Body uses weight 400 and line-height 1.5. Labels use 500 and 1.4. Headings use 600 and 1.25. Do not use thin 300 weight.

Reference spacing

TokenpxTokenpx
--ref-space-00--ref-space-0-52
--ref-space-14--ref-space-1-56
--ref-space-28--ref-space-312
--ref-space-416--ref-space-520
--ref-space-624--ref-space-832
--ref-space-1040--ref-space-1248
--ref-space-1664

Theme and Density never rewrite Reference spacing.

Radius

TokenpxUse
--ref-radius-none0Continuous table surface
--ref-radius-control4Input, select, tag, checkbox
--ref-radius-panel6Button, panel, card
--ref-radius-overlay8Dialog, sheet, popover
--ref-radius-feature12Rare feature surface
--ref-radius-full9999Avatar and circular icon

Do not scale all components from one global radius or build a default wall of large-radius cards.

Elevation

TokenValueUse
--sys-elevation-0noneDefault work surface
--sys-elevation-10 1px 2px rgb(13 20 26 / 5%)Static lift
--sys-elevation-20 4px 12px rgb(13 20 26 / 8%)Dropdown and popover
--sys-elevation-30 8px 24px rgb(13 20 26 / 10%), 0 2px 6px rgb(13 20 26 / 6%)Dialog
--sys-elevation-sheet-12px 0 36px rgb(13 20 26 / 14%), -2px 0 8px rgb(13 20 26 / 7%)Right sheet

Colored shadows and glow are prohibited.

Motion and density

Durations are 0ms, 120ms, 180ms, and 240ms. Structural motion becomes instant under prefers-reduced-motion.

Global component tokens

Global component tokens do not vary with density. They define fixed shell, page, and panel dimensions:

TokenValueUse
--cmp-shell-padding-inline16pxShell horizontal padding
--cmp-page-max-width-standard100remStandard page max width
--cmp-page-max-width-comfortable60remReading page max width
--cmp-panel-min-width15remMulti-panel min width
--cmp-panel-default-width20remMulti-panel default width
--cmp-panel-max-width30remMulti-panel max width
--cmp-panel-narrow-min-width12.5remNarrow panel min width

Density

Density has four levels: dense, compact, comfortable, spacious. dense targets high-density tables and bulk desktop operations; spacious targets touch and accessibility scaling.

Component semanticDenseCompactComfortableSpacious
--cmp-control-height24px32px40px48px
--cmp-control-font-size13px14px14px16px
--cmp-control-line-height16px20px20px24px
--cmp-table-header-height28px36px44px52px
--cmp-table-row-height28px36px48px52px
--cmp-table-row-height-two-line40px48px60px64px
--cmp-table-cell-padding-x6px12px16px20px
--cmp-table-cell-padding-y2px6px10px12px
--cmp-field-gap6px12px16px20px
--cmp-field-min-width144px160px176px192px
--cmp-section-gap8px16px24px32px
--cmp-workspace-page-padding12px16px20px24px
--cmp-panel-header-height36px40px44px48px
--cmp-panel-header-padding-x8px12px16px20px
--cmp-panel-header-padding-y4px6px8px10px
--cmp-panel-body-padding-x8px12px16px20px
--cmp-panel-body-padding-y8px12px16px20px
--cmp-panel-handle-width4px4px4px4px
--cmp-panel-handle-hit-width12px12px12px12px
--cmp-panel-collapsed-rail-width48px48px48px48px
--cmp-panel-collapse-icon-size16px16px18px18px

Density overrides control, table, field, panel, and workspace semantic dimensions. It does not change font families, brand colors, Reference spacing, or page structure. control-font-size and control-line-height vary with density and are further scaled by the accessibility fontScale axis. Dense interaction targets remain at least 24px; visible line height and touch target are calculated separately.

Button, input, select, table, query toolbar, and panel primitives must consume these Component Tokens directly. Changing only the data-density attribute without changing the rendered geometry is not a conformant density implementation.

Consumption examples

A table primitive reads density-aware Component Tokens directly. Changing the root data-density updates row height, padding, and typography without maintaining four component class sets:

/* Geometry follows the active Density and never reads Reference spacing. */
.data-cell {
min-block-size: var(--cmp-table-row-height);
padding: var(--cmp-table-cell-padding-y) var(--cmp-table-cell-padding-x);
font-size: var(--cmp-control-font-size);
line-height: var(--cmp-control-line-height);
}

Structural motion and elevation use System Tokens. data-reduce-motion=true or the operating-system preference remaps System duration to instant, so a product component needs no second animation branch:

/* Stable semantic roles control sheet size, elevation, and motion. */
.operation-sheet {
inline-size: clamp(
var(--cmp-panel-min-width),
var(--cmp-panel-default-width),
var(--cmp-panel-max-width)
);
box-shadow: var(--sys-elevation-sheet);
transition-duration: var(--sys-duration-structural);
}

100%

Scroll or use controls to zoom · drag when enlarged · double-click for 100% / 200%