Skip to main content

Module layout

Module layout 

Source
Expand description

Round 2 (docs/round-2-contract.md §7): the shared layout NUMBERS (catalog/layout.json, generated as LAYOUT_CONSTANT_NAMES/VALUES): one place for the core and every painter.

Constants§

FIELD_INTRINSIC_WIDTH
The max-content width of a text field (px).
MEDIA_ASPECT_RATIO
Width / height of an Image without aspectRatio or a height; Video’s default.
MEDIA_INTRINSIC_WIDTH
The max-content width of an Image/Video without a width (px).
PANEL_MIN
A panel’s min (percent) when unset.
PENDING_DELAY_MS
EXP-1259: how long a loading Button waits before it shows its pending state (ms).
RESIZE_HANDLE_HIT
A Resizable handle’s hit area across its hairline (px).
RESIZE_STEP
Percentage points per arrow key on a Resizable handle.
SEARCH_LIST_FADE
The bottom fade over a SearchList’s rows while more sit below (px).
SKELETON_OPACITY_HIGH
SKELETON_OPACITY_LOW
SKELETON_PULSE_MS
The Skeleton’s ONE opacity pulse (ms, low → high → low, ease-in-out).
SKELETON_REDUCED_OPACITY
The Skeleton’s static opacity under reduce motion.
TABLE_COLUMN_MIN
EXP-1548: the narrowest a Table column without a width gets (px); a table whose columns need more than its box scrolls horizontally.
TREE_GUIDE_BRIDGE
How far a TreeGuides vertical overshoots its row’s TOP to bridge a Section divider (px; paint only, never layout).
TREE_GUIDE_COLUMN
One TreeGuides gutter column (px).
TREE_GUIDE_RADIUS
The radius of a TreeGuides elbow’s corner (px).
WINDOW_OVERSCAN
Items rendered beyond each viewport edge.
WINDOW_THRESHOLD
Items past which List and Table window.

Functions§

layout_constant
A layout constant by name (windowThreshold, mediaAspectRatio, …).