Centres a page's content and caps its width, with padding at the sides so text never touches the edge of a phone. Four sizes, from a 40rem reading column to an 80rem dashboard.
Every example is a real file you can copy. The bordered box in each one stands for the browser window; widen and narrow your own window to see the column follow.
minimal · light · #3fa34d
Guides · 03/14/2026 · 6 min read
How we cut our delivery time to two days
Last year a coffee order took five days to reach São Paulo. We moved roasting to Monday and Thursday, printed labels the night before and shipped from a second warehouse in Campinas. Here is what changed, week by week.
sm · 40rem (640px): forms, articles, sign-in.
Four sizes
Pick a size. The drawing is a 1440 px screen shrunk to fit, so you see the real proportions: sm for reading and forms, lg (the default) for most pages, xl for tables.
Brewing with a pour-over
Rinse the paper filter with hot water, then discard it. Add 15 g of medium-fine coffee, pour 30 ml of water at 94 °C and wait 30 seconds while it blooms. Pour the rest in slow circles until you reach 250 ml, about two and a half minutes in total.
Reading width
Long text reads best at 60–75 characters a line. Set --cml-container-max: 65ch and the column follows the font, not the screen.
New this month
Subscribe and save 15%
Fresh beans every two weeks, roasted the day they ship. Pause or cancel whenever you want.
Full-bleed section
Put the background on an outer section and the Container inside it: the colour runs edge to edge, the text stays in line with the rest of the page.
Order #4821
Out for delivery. Arrives today between 2 and 4 PM.
padding-inline: 1rem
Padding on phones
Turn on the wider gutter. Below its maximum, the column fills the screen but keeps 1rem at each side; change --cml-container-padding for more air.
A narrow form
A sign-up form doesn't need the page's width. size="sm" keeps every label, field and the button within one glance.
—Container isn't interactive and takes no focus. Tab goes straight to the links and fields inside it.
It renders a div with no role. Use as="main" for the page's main column, so screen readers can jump to it.
The width is capped in rem, so it grows with the reader's font size and zoom; at 400% zoom the column simply fills the screen, with no sideways scrolling.
The padding keeps text off the screen edge on phones, where rounded corners and cases would otherwise cut it.
Changing the size never changes the reading order: the content stays in source order at every width.