Object-shaped cards
Where a record stands for a physical thing, the card is drawn as that thing — nine variations in pure gradients.
0Assets
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 — in a reporting form and in a second form where each tile is the filter for the list beneath it.
Reporting only — the figures are the whole job.
Same strip, working as the filter. Press a tile to narrow the list; press it again to clear.
Showing all 6 downloads.
<p class="hss-cap">Reporting only — the figures are the whole job.</p> <dl class="hss-strip"> <div class="hss-tile"><dt class="k">Documents</dt><dd class="v">1,482</dd><dd class="s">this period</dd></div> <div class="hss-tile"><dt class="k">Median time</dt><dd class="v">3.2<span class="u">s</span></dd><dd class="s">last 24h</dd></div> <div class="hss-tile"><dt class="k">Clean runs</dt><dd class="v">98.4<span class="u">%</span></dd><dd class="s">no retries</dd></div> <div class="hss-tile"><dt class="k">Quality score</dt><dd class="v none" aria-label="No value">—</dd><dd class="s">not rated yet</dd></div> </dl> <div class="hss-strip five" role="group" aria-label="Filter downloads by status"> <button class="hss-tile" type="button" aria-pressed="true" data-state="All"><span class="k">All</span><span class="v">6</span><span class="s">downloads</span></button> <button class="hss-tile" type="button" aria-pressed="false" data-state="Queued"><span class="k">Queued</span><span class="v">2</span><span class="s">downloads</span></button> <!-- Downloading, Done, Failed follow the same shape --> </div> <ul class="hss-list" id="hss-items"> <li data-state="Done">Bicycle drivetrain teardown <span>Done</span></li> <!-- … --> </ul> <p class="hss-status" role="status">Showing all 6 downloads.</p>
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;
gap: 1px; /* the hairline */
background: var(--border); /* shows through the gap */
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
grid-template-columns: 1fr;
}
@media (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 42rem) { .hss-strip { grid-template-columns: repeat(4, 1fr); } }
.hss-tile { background: var(--surface); color: var(--ink); padding: 14px 16px; min-width: 0; }
.hss-tile .k { font: 600 0.8125rem/1.3 ui-monospace, monospace; text-transform: uppercase; color: var(--dim); }
.hss-tile .v { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hss-tile .v.none { color: var(--dim); }
button.hss-tile[aria-pressed="true"] {
background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}
const tiles = document.querySelectorAll('button.hss-tile');
const items = document.querySelectorAll('#hss-items li');
const status = document.querySelector('.hss-status');
tiles.forEach((tile) => {
tile.addEventListener('click', () => {
const wasOn = tile.getAttribute('aria-pressed') === 'true';
const state = wasOn || tile.dataset.state === 'All' ? 'All' : tile.dataset.state;
tiles.forEach((other) => other.setAttribute('aria-pressed', String(other.dataset.state === state)));
let shown = 0;
items.forEach((item) => {
const visible = state === 'All' || item.dataset.state === state;
item.hidden = !visible;
if (visible) shown += 1;
});
status.textContent = state === 'All'
? 'Showing all 6 downloads.'
: `Filtered to ${state}: ${shown} of 6. Press the lit tile again to clear.`;
});
});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.
Pin the column counts. Go from one column to two at 21rem and to four at 42rem. Do not use auto-fit: a row that reflows to three tiles over one leaves an orphan and a hole of container colour.
Tile anatomy. A mono uppercase label, a large tabular-nums figure, and a one-line qualifier that says what window the figure covers.
Two rules of honesty. Render a missing value as a dimmed em dash, never as zero. Keep units with the number, set smaller, so a percent is never read as a count.
The filter form. In the second form each tile is a button that filters the list beneath it. Compute every count from the unfiltered set, so the tiles never change while you filter, and mark the lit tile with aria-pressed rather than tab roles, because pressing it again clears the filter.
Excerpt. The full prompt continues with the exact breakpoints, the tile markup, and the accessibility checks.
:root { --ground:#eef0f3; --surface:#ffffff; --border:#d2d8e0; --ink:#161b22; --dim:#56606e; --accent:#364f6a; --radius:10px }
.hss-strip {
display: grid;
gap: 1px; /* the hairline */
background: var(--border); /* shows through the gap */
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
grid-template-columns: 1fr;
}
@media (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 42rem) { .hss-strip { grid-template-columns: repeat(4, 1fr); } }
.hss-tile { background: var(--surface); color: var(--ink); padding: 14px 16px; min-width: 0; }
.hss-tile .k { font: 600 0.8125rem/1.3 ui-monospace, monospace; text-transform: uppercase; color: var(--dim); }
.hss-tile .v { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hss-tile .v.none { color: var(--dim); }
button.hss-tile[aria-pressed="true"] {
background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}
<p class="hss-cap">Reporting only — the figures are the whole job.</p>
<dl class="hss-strip">
<div class="hss-tile"><dt class="k">Documents</dt><dd class="v">1,482</dd><dd class="s">this period</dd></div>
<div class="hss-tile"><dt class="k">Median time</dt><dd class="v">3.2<span class="u">s</span></dd><dd class="s">last 24h</dd></div>
<div class="hss-tile"><dt class="k">Clean runs</dt><dd class="v">98.4<span class="u">%</span></dd><dd class="s">no retries</dd></div>
<div class="hss-tile"><dt class="k">Quality score</dt><dd class="v none" aria-label="No value">—</dd><dd class="s">not rated yet</dd></div>
</dl>
<div class="hss-strip five" role="group" aria-label="Filter downloads by status">
<button class="hss-tile" type="button" aria-pressed="true" data-state="All"><span class="k">All</span><span class="v">6</span><span class="s">downloads</span></button>
<button class="hss-tile" type="button" aria-pressed="false" data-state="Queued"><span class="k">Queued</span><span class="v">2</span><span class="s">downloads</span></button>
<!-- Downloading, Done, Failed follow the same shape -->
</div>
<ul class="hss-list" id="hss-items">
<li data-state="Done">Bicycle drivetrain teardown <span>Done</span></li>
<!-- … -->
</ul>
<p class="hss-status" role="status">Showing all 6 downloads.</p>
<script>
const tiles = document.querySelectorAll('button.hss-tile');
const items = document.querySelectorAll('#hss-items li');
const status = document.querySelector('.hss-status');
tiles.forEach((tile) => {
tile.addEventListener('click', () => {
const wasOn = tile.getAttribute('aria-pressed') === 'true';
const state = wasOn || tile.dataset.state === 'All' ? 'All' : tile.dataset.state;
tiles.forEach((other) => other.setAttribute('aria-pressed', String(other.dataset.state === state)));
let shown = 0;
items.forEach((item) => {
const visible = state === 'All' || item.dataset.state === state;
item.hidden = !visible;
if (visible) shown += 1;
});
status.textContent = state === 'All'
? 'Showing all 6 downloads.'
: `Filtered to ${state}: ${shown} of 6. Press the lit tile again to clear.`;
});
});
</script>
Where a record stands for a physical thing, the card is drawn as that thing — nine variations in pure gradients.
A container with no artwork draws one from up to four member tiles, grid tracks following tile count.
Text printed over unreviewed artwork, scrimmed to an alpha that can be written down rather than guessed.