Skip to main content

Module layout

Module layout 

Source
Expand description

Control metrics and window breakpoints.

Constants§

APP_BAR_BLOCK_PADDING
Above and below the control row of an app bar.
COMPACT_WINDOW
The window width, in 100%-scale px, below which pages use narrow gutters, compact navigation and stacked controls.
CONTROL_HEIGHT
Ordinary controls share this height, padding included, at every text scale.
ICON_GAP
ICON_SLOT
The leading icon slot of an icon + label cluster, and the gap after it.
ITEM_INSET
Horizontal inset of an item’s content inside a tile or card.
LABEL_INSET
Supporting lines of an icon-labelled item start on its label text.
SECTION_TITLE_GAP
Legacy px form of SECTION_TITLE_SPACE that does not follow the text scale; kept until its call sites move to the rem token.
SECTION_TITLE_SPACE
Between a section title and its group’s first tile. The gap follows the title’s text, so it is in rems; prefer this over SECTION_TITLE_GAP.

Functions§

app_bar_height
An app bar of one control row with APP_BAR_BLOCK_PADDING above and below, all following the text scale.
design_width
The window width in 100%-scale px, so breakpoints follow the text scale.
is_compact