Skip to main content

Module layout

Module layout 

Source
Expand description

Sizing and placing elements.

Containers lay their children out along one axis, like a CSS flex row or column with flex-wrap: nowrap. Sizes come from the stylesheet (width, height, min-*, max-*, margin, padding, border, gap); which way a container goes, whether a child grows, and how children are aligned are attributes on the elements, since they are about structure rather than looks: grow and align on a child, align_items and justify on a container.

width and height are border-box sizes, as with box-sizing: border-box. Percentages are of the parent’s content box. The root always fills the viewport.

Enums§

Align
Where a child sits across its container’s axis.
Justify
How a container spreads its children along its axis when they do not fill it and none of them grows.