Layout
Hairline stat strip
A row of stat tiles joined by hairlines that are grid gap, not borders — the container paints the border color and the tiles paint the surface, so separators never double up or break when the row wraps.
Reach for it when building
- summary strip at the top of a detail page
- dashboard KPI row
- account usage overview
- report header figures
- profile stats band
- stats
- css-grid
- css-only
- hairline
- no-assets
<div class="hss-strip">
<div class="hss-tile" title="Documents processed in the current billing period">
<p class="hss-label">Documents</p>
<p class="hss-figure">1,482</p>
<p class="hss-hint">this period</p>
</div>
<div class="hss-tile" title="Median end-to-end processing time over the last 24 hours">
<p class="hss-label">Median time</p>
<p class="hss-figure">3.2s</p>
<p class="hss-hint">last 24h</p>
</div>
<div class="hss-tile" title="Share of runs that finished without a retry">
<p class="hss-label">Clean runs</p>
<p class="hss-figure">98.4%</p>
<p class="hss-hint">no retries</p>
</div>
<div class="hss-tile" title="No rating has been collected yet">
<p class="hss-label">Quality score</p>
<p class="hss-figure hss-empty">—</p>
<p class="hss-hint">not rated yet</p>
</div>
</div>Colors come from shared theme tokens — --surface, --ink, --border, --accent and friends — so this CSS carries no palette
of its own. Use Runnable file to copy the tokens along with it.
.hss-strip {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
/* The whole trick: the 1px gap over the container's border-colored
background IS the separator. Real borders double where tiles meet and
break at the wrap edge; a gap cannot do either. */
gap: 1px;
background: var(--border);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
max-width: 720px;
}
.hss-tile {
background: var(--surface);
padding: 1rem 1.25rem;
margin: 0;
}
.hss-label {
margin: 0;
font-family: var(--mono);
font-size: 0.8125rem;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--dim);
}
.hss-figure {
margin: 0;
font-size: 1.6rem;
font-weight: 700;
line-height: 1.25;
font-variant-numeric: tabular-nums;
color: var(--ink);
}
.hss-empty { color: var(--dim); }
.hss-hint {
margin: 2px 0 0;
font-size: 0.9375rem;
color: var(--dim);
}Paste this into an agent to rebuild the pattern from scratch.
Build a strip of statistic tiles that reads as one joined instrument panel rather than a row of floating cards.
The separators between tiles must not be borders. Make the container a CSS grid with `gap: 1px` and give the container itself the border color as its background; each tile then paints the surface color on top. The 1px of container showing through the gap is the hairline. This is the entire pattern: real borders double where two tiles meet and leave a stray edge when auto-fit wraps the row, and a gap physically cannot do either. Wrap the container in a normal 1px border with a radius and `overflow: hidden` so the outer edge matches the hairlines.
Use `grid-template-columns: repeat(auto-fit, minmax(160px, 1fr))` so the strip reflows to any width with zero breakpoint work — at narrow widths tiles wrap into rows and the hairline grid stays perfect.
Inside each tile: an uppercase label in the mono face at a small size with letter-spacing, the figure large and bold with `font-variant-numeric: tabular-nums` so digits align across tiles, and an optional dimmed hint line under it. Give every tile a `title` attribute stating in plain language what the metric measures, so derived figures explain themselves on hover.
Two rules of honesty. A tile whose value is missing still renders — with a dimmed em dash as its figure and a hint naming the action that would fill it ("not rated yet") — because an omitted tile reads as a missing feature and reflows its neighbours. And never put units in a separate visual channel from the number; keep "3.2s" as one string.
Every color comes from theme custom properties, and the strip has to read correctly in both light and dark themes.