Container & section
The frame of a website page. A .section is a full-width band with steady space above and below; a .container inside it keeps the content in a centered column with side padding that grows with the screen.
The pattern
<section class="section section-surface">
<div class="container">
<div class="section-head">
<span class="eyebrow">Features</span>
<h2>Everything in one place</h2>
<p>One sentence that says why it matters.</p>
</div>
…
</div>
</section>
Sections stack one after another down the page; give them different backgrounds (or a .section-line) to tell them apart. The landing example is built this way.
Section head
The eyebrow, title and lead at the top of a section. .section-head-center centers it; .section-head-row puts a link or buttons beside it.
Bold on purpose
Thick lines, flat colors and hard shadows that make every screen easy to read at a glance.
Latest posts
<div class="section section-sm section-brand">
<div class="container">
<div class="section-head section-head-center">
<span class="eyebrow">Why Momo</span>
<h2>Bold on purpose</h2>
<p>Thick lines, flat colors and hard shadows that make every screen easy to read at a glance.</p>
</div>
</div>
</div>
<div class="section section-sm section-surface section-line">
<div class="container">
<div class="section-head section-head-row m-0">
<div class="section-head-text"><span class="eyebrow">Blog</span><h2>Latest posts</h2></div>
<a class="icon-link icon-link-hover" href="#">All posts <i class="mi mi-arrow-right rtl-flip" aria-hidden="true"></i></a>
</div>
</div>
</div>Section backgrounds
<div class="section section-sm section-paper"><div class="container"><b>section-paper</b>: the page color</div></div>
<div class="section section-sm section-surface"><div class="container"><b>section-surface</b>: white (dark gray in dark mode)</div></div>
<div class="section section-sm section-violet-soft"><div class="container"><b>section-violet-soft</b>: any color, soft</div></div>
<div class="section section-sm section-yellow"><div class="container"><b>section-yellow</b>: any color, full</div></div>
<div class="section section-sm section-ink"><div class="container"><b>section-ink</b>: dark, with light text</div></div>Patterns and effects
Give a section any background from Backgrounds: a pattern (bg-dots ... bg-plus, colored with pattern-<color>), blobs, a gradient or grain. The section color sets the base and the text; the bg-* class adds the effect.
<div class="stack gap-3">
<div class="section section-sm section-violet-soft bg-dots pattern-violet border rounded"><div class="container"><b>section-violet-soft bg-dots pattern-violet</b></div></div>
<div class="section section-sm section-ink bg-grid border rounded"><div class="container"><b>section-ink bg-grid</b></div></div>
<div class="section section-sm section-paper bg-waves pattern-blue border rounded"><div class="container"><b>section-paper bg-waves pattern-blue</b></div></div>
<div class="section section-sm section-paper bg-blobs blobs-corners bg-noise border rounded"><div class="container"><b>section-paper bg-blobs blobs-corners bg-noise</b></div></div>
</div>Container widths
<div class="stack gap-2">
<div class="container container-sm"><div class="box p-2 text-center">container-sm · 640px</div></div>
<div class="container container-prose"><div class="box p-2 text-center">container-prose · 672px</div></div>
<div class="container container-md"><div class="box p-2 text-center">container-md · 896px</div></div>
<div class="container"><div class="box p-2 text-center">container · 1152px (the default)</div></div>
</div>Classes
| Class | Does |
|---|---|
.container | Centered, at most 1152px wide, side padding 16px to 32px. -sm 640, -prose 672, -md 896, -lg 1152, -xl 1280, -2xl 1440, -full no limit. |
.section | Space above and below: 48px on phones up to 96px. -sm less, -lg more, -flush none. |
.section-paper / -surface / -brand / -ink | Backgrounds. Also .section-<color> and .section-<color>-soft. |
.section-line / -line-bottom | A line above / below the section |
.bg-dots, -grid, -lines, -hatch, -stripes, -checks, -zigzag, -waves, -plus | A pattern on the section. They work on any element: see Backgrounds. |
.pattern-<color> | Colors the pattern: any palette color, -ink or -brand |
.section-head | Eyebrow, title (h2), lead (p). -center, -row (with .section-head-text), -sm (a smaller title, for a narrow column). |