Layout
Breakpoints
Mobile-first. An unprefixed class applies everywhere; add a breakpoint prefix to apply it from that width and up.
| Prefix | Min width | Typical screen |
|---|---|---|
| none | 0 | Phones |
sm: | 576px | Large phones |
md: | 768px | Tablets |
lg: | 1024px | Laptops |
xl: | 1280px | Desktops |
2xl: | 1536px | Large desktops |
<!-- full width on phones, half on tablets, a quarter on laptops -->
<div class="col-12 md:col-6 lg:col-3">…</div>
Change the breakpoints in BREAKPOINTS at the top of build.mjs.
Responsive columns
Resize the window: one column on phones, two on tablets, four on laptops.
1
2
3
4
<div class="row g-3">
<div class="col-12 md:col-6 lg:col-3"><div class="cell">1</div></div>
<div class="col-12 md:col-6 lg:col-3"><div class="cell">2</div></div>
<div class="col-12 md:col-6 lg:col-3"><div class="cell">3</div></div>
<div class="col-12 md:col-6 lg:col-3"><div class="cell">4</div></div>
</div>
Responsive spacing
Gutters take prefixes too — tight on phones, roomy on large screens.
g-2
lg:g-8
…
<div class="row g-2 lg:g-8">
<div class="col"><div class="cell">g-2</div></div>
<div class="col"><div class="cell">lg:g-8</div></div>
<div class="col"><div class="cell">…</div></div>
</div>
In your own CSS
Use the same widths in your own media queries so everything changes together.
.order-summary { display: grid; gap: 1rem; }
@media (min-width: 768px) { /* md */
.order-summary { grid-template-columns: 2fr 1fr; }
}
@media (min-width: 1024px) { /* lg */
.order-summary { gap: 2rem; }
}