Container

A responsive layout class that centers content, applies a mobile gutter, and constrains width at named breakpoints. On mobile the container is full-width with horizontal padding; from $desktop upward the padding is removed and max-width is set by subtracting a caller-supplied offset from each breakpoint value.

.container

Mixin:

@mixin container($container-offset, $mobile-gutter)

Base styles (always applied)

PropertyValuePurpose
flex-grow1Fills available flex space inside a flex parent.
margin0 autoHorizontally centres the container.
positionrelativeEstablishes a positioning context for absolutely-placed children.
width100%Full width on mobile before breakpoints constrain it.
padding0 $mobile-gutterPrevents content touching viewport edges on small screens.

Breakpoint behaviour

desktop
$iv.$desktop
max-width: $desktop − offset
padding: unset
widescreen
$iv.$widescreen
max-width: $widescreen − offset
fullhd
$iv.$fullhd
max-width: $fullhd − offset

Each breakpoint uses the mx.from() min-width mixin, so rules cascade upward. The padding: unset at desktop is set once and inherited by wider breakpoints — no need to repeat it.