Skip to content

Container

A fixed-width, centered container: size maps to --oas-container-* width tokens, margin-inline: auto centers it (logical property, RTL-compliant automatically), and max-width: min(100%, token) prevents overflow on narrow screens.

Basic usage

Default lg centered

max-width: 992px

Sizes

size has six tiers: xs(480)/ sm(576)/ md(768)/ lg(992)/ xl(1200)/ full(100%). The container uses a hover background color to mark its actual width.

Six size tiers

xs · 480pxsm · 576pxmd · 768pxlg · 992pxxl · 1200pxfull · 100%

Disable centering

With center="false" centering is disabled (margin-inline: 0) and the container hugs the start of the line (the left side in LTR).

center=false

Left-aligned, no longer centered

Padding

padding accepts any token/value and applies to padding-inline (logical padding).

padding

16px padding on both sides of the content

Empty container

An empty container causes no error and takes no placeholder.

Empty container

API

Attributes

AttributeDescriptionTypeDefault
centerWhether to center (center="false" disables)stringtrue
paddingPadding token/value (applies to padding-inline)
sizeFixed-width tier, mapped to --oas-container-* tokensstringlg

Slots

NameDescription
default