Skip to content

Sizing

Two axes size every component: density (control heights, paddings, gaps, icons, card and dialog padding) and radius (every radius role). A sizing theme picks one of each, adds its own values and, on a phone (below 768px), its touch values; sizingThemeCss renders it for :root or a subtree. The hit area, the 16px field text on a phone, hairlines and layout widths never scale.

Styles

Named sizing themes: a density, a radius and their own values. Each sample below is scoped with sizingThemeCss(SIZING_STYLES.name, '[data-sizing=…]'). Pick one for every page in Customize.

Density × radius

The two axes alone, without a style’s own values. Density moves heights and room; radius moves shape.

Painted height

A control paints exactly its box: fill, border and rings stay between the dashed guides, on any surface, so a 36px button looks 36px at every emphasis and in every state. Measured live in this page’s theme and mode; a red reading is a regression. Edges are borders inside the box (--edge on raised, --intent-border on outline), never a ring outside it.

Token reference

Every token a sizing theme sets, by family, with the components that read it. A density of your own is any of these: scaleDensity(0.9), or a map of token to px.

Density

What each density sets; a dash keeps the default. Type, page and section spacing stay.

Tokendefaultcompactcomfortable
--spacing-part121014
--spacing-group161220
--spacing-card201624
--spacing-control-2xs201822
--spacing-control-xs242028
--spacing-control-sm322836
--spacing-control363240
--spacing-control-lg403644
--spacing-control-pad-xs8610
--spacing-control-pad-sm121014
--spacing-control-pad161218
--spacing-control-gap-sm4–6
--spacing-control-gap6–8
--spacing-icon-xs12–14
--spacing-icon-sm14–16
--spacing-icon16–18
--spacing-field-pad121014
--spacing-field-pad-y8610
--spacing-menu-item363240
--spacing-menu-item-pad10812
--spacing-row-pad-x121014
--spacing-row-pad-y10812
--spacing-row-gap8–10
--spacing-modal242028
--spacing-popup10812
--spacing-picker121014
--spacing-popup-inset4–6
--spacing-list-inset86–
--badge-height242028
--badge-height-sm201822
--badge-pad-x8610
--badge-pad-x-sm648
--kbd-pad-x4–6
--field-chip-pad-x8610
--field-button-pad-x648
--textarea-min-height605272
--file-drop-zone-pad-x242028
--file-drop-zone-pad-y282432
--item-gap10812
--sidebar-sub-height282432
--table-head-height403644
--table-foot-pad-y121014
--table-group-height363240
--command-input-height484452
--command-footer-height444048
--alert-pad-x201624
--alert-pad-y10812
--tooltip-pad-x8–10
--tooltip-pad-y4–6
--toast-pad-x141216
--toast-pad-y121014
--empty-pad-x242028
--empty-pad-y403248
--empty-pad-x-sm1612–
--empty-pad-y-sm2420–
--prose-pre-pad121014
--checkbox-size16–18
--radio-dot-size6–8
--choice-card-height484452
--choice-card-pad-y121014
--switch-width363240
--switch-width-sm282432
--switch-thumb161418
--switch-thumb-sm121014
--slider-thumb12–16
--stepper-indicator-size201824

Radius

What each radius sets. Pill rounds single-line controls fully and caps surfaces, multi-line fields, blocks, tooltips and the checkbox; sharp squares the fixed steps too.

Tokendefaultsharpsoftpill
--radius-control-xs405full
--radius-control-sm8010full
--radius-control10012full
--radius-control-lg12014full
--radius-popup1602020
--radius-card2002424
--radius-dialog2002424
--radius-panel2002424
--radius-checkbox4256
--radius-tooltip801012
--radius-area1001216
--radius-block1201416
--radius-trackfull2––
--radius-xs20––
--radius-sm40––
--radius-md60––
--radius-lg80––
--radius-xl100––
--radius-2xl120––
--radius-3xl160––
--radius-4xl200––
--radius-5xl240––
--tabs-radius10012full
--alert-radius2002424
--bottom-nav-radius16020full
--drawer-radius32038–
--drawer-menu-item-radius14017–
--drawer-option-radius16019–

Style values

Each style’s values on top of its density and radius, then its touch values on a phone, below 768px.

TokenCossCoss touchDenseDense touchSoft
--spacing-part8–8–14
--spacing-group16–12–20
--spacing-card24–12–24
--spacing-control-2xs20–161822
--spacing-control-xs2024202028
--spacing-control-sm2832242836
--spacing-control3236283240
--spacing-control-lg3640323644
--spacing-control-pad-xs6–6–10
--spacing-control-pad-sm10–8–14
--spacing-control-pad12–10–18
--spacing-control-gap-sm––––6
--spacing-control-gap8–4–8
--spacing-icon-xs–1410–14
--spacing-icon-sm–16121416
--spacing-icon–18141618
--spacing-icon-lg––16––
--spacing-field-pad12–81014
--spacing-field-pad-y6–4–10
--spacing-menu-item2832283240
--spacing-menu-item-pad8–8–12
--spacing-row-pad-x10–10–14
--spacing-row-pad-y8–6–12
--spacing-row-gap––6–10
--spacing-modal24–16–28
--spacing-popup16–8–12
--spacing-picker10–10–14
--spacing-popup-inset––––6
--spacing-list-inset6–6––
--radius-control-xs––––full
--radius-control-sm6–6–full
--radius-control––8–full
--radius-control-lg10–8–full
--radius-popup10–10–24
--radius-card18–12–28
--radius-dialog18–14–28
--radius-panel14–12–28
--radius-checkbox––––6
--radius-tooltip––6–12
--radius-area––8–16
--radius-block10–8–16
--text-control––1314–
--text-control--line-height––1820–
--badge-height182220–28
--badge-height-sm162016–22
--badge-pad-x4–4–10
--badge-pad-x-sm4–4–8
--kbd-pad-x––3–6
--tabs-radius8–8–full
--tabs-inset2–2––
--field-chip-pad-x6–6–10
--field-button-pad-x4–4–8
--textarea-min-height728448–72
--file-drop-zone-pad-x20–16–28
--file-drop-zone-pad-y24–20–32
--item-gap8–8–12
--sidebar-sub-height24–24–32
--table-head-height40–32–44
--table-foot-pad-y10–8–14
--table-group-height3240324040
--command-input-height44–40–52
--command-footer-height40–36–48
--alert-pad-x14–12–24
--alert-pad-y12–6–12
--alert-radius14–12–28
--bottom-nav-radius––––full
--tooltip-pad-x––6–10
--tooltip-pad-y––2–6
--toast-pad-x14–12–16
--toast-pad-y12–8–14
--empty-pad-x20–16–28
--empty-pad-y32–24–48
--empty-pad-x-sm12–12––
--empty-pad-y-sm20–16––
--prose-pre-pad10–8–14
--checkbox-size–18141618
--radio-dot-size–8––8
--choice-card-height44–40–52
--choice-card-pad-y10–8–14
--switch-width3038283240
--switch-width-sm223024–32
--switch-thumb1620121418
--switch-thumb-sm121610–14
--switch-inset1––––
--slider-thumb1620––16
--stepper-indicator-size18–16–24