Centered, full-width containers whose max-width steps up at each breakpoint.
Classes:
container: Full width, centered, with block padding and a max-width per breakpoint
container.flex/container.grid: The same container with display flex or grid (needs the flex or grid feature flag)
Generated from the doc blocks in the core source when the site is built, so it always matches the current release of @wovenui/core. Every example is compiled against core during the build; open Compiled CSSunder an example to see its output. Guide: Container. The A to Z index lists every public mixin and function.
Makes an element full width and centers it on the inline axis (margin-inline: auto).
@mixincontainer-base
Example
.page {
@includecontainer-base;
@includemax-width(1200px);
}
Compiled CSS
.page {
width: 100%;
margin-inline: auto;
max-width: 1200px;
}
See also: container. Source: layouts/_container.scss:27
container-paddingmixin
Sets padding-top and padding-bottom to the same spacing value.
A unitless number that is not a spacing key, or a negative key, raises @error.
@mixincontainer-padding($padding)
Parameter
Type
Default
Description
$padding
Number|Length
Required
A $spacings key (4 gives var(--wu-space-4)) or a value with units, passed through raw
Example
.section {
@includecontainer-padding(8); // padding-top and padding-bottom: var(--wu-space-8)
}
Compiled CSS
.section {
padding-top: var(--wu-space-8);
padding-bottom: var(--wu-space-8);
}
See also: container, py. Source: layouts/_container.scss:42
containermixin
Builds a centered, full-width container whose max-width steps up at each breakpoint (breakpoint width minus 100px), with block padding of spacing key 4 (top and bottom only).
100px is subtracted from each breakpoint width; an em or rem breakpoint gives calc(40em - 100px).
@mixincontainer($display: block)
Parameter
Type
Default
Description
$display
String
block
Display value: block, flex, grid, inline-block, inline-flex, inline-grid, flow-root, a CSS-wide keyword or var(); anything else raises an error