Grid
A responsive grid: as many columns as fit, each at least --grid-min wide, never wider than the container.
Live example
Grid
<div class="grid" style="--grid-min: 12rem">
<article data-card>
<h4>Atoms</h4>
<p>Native elements styled by the base layer, plus a few attributes.</p>
</article>
<article data-card>
<h4>Molecules</h4>
<p>Small groups of atoms, such as tabs, dialogs and cards.</p>
</article>
<article data-card>
<h4>Organisms</h4>
<p>Larger sections built from molecules. Coming later.</p>
</article>
</div>
API
| Attribute or value | Effect |
|---|---|
class="grid" | |
--grid-min | minimum column width (default: var(--dui-size-column-min)) |
--grid-gap | gap between cells (default: var(--dui-space-l)) |
No media queries. Pattern: "RAM" (repeat, auto-fit, minmax), see and "The Grid", Every Layout.
The custom properties do not inherit, so nested grids keep their defaults.
Specifications
See also
- Layouts
- Component API convention
- Accessibility baseline
- Source:
css/layout/grid.css,examples/base.html
How other systems do it
For comparison only; these are not the standard this system follows.
- Apple Human Interface Guidelines: No equivalent
- Material Design 3: No equivalent
- Vercel Geist: No equivalent