Setting — tabular figures
Variant: Tabular figures
A column of timings set in proportional figures, then switched to tabular-nums so every digit sits on the same column. Proportional 1s are narrower than 8s and 0s, so in a right-aligned column a figure's position is the sum of every advance to its right, and the drift grows the further left you look. That is why the dashed proof rule hangs from the thousands comma rather than the decimal point: six glyphs in, the drift is wide enough to see. The rule is hung from the comma of an invisible tabular copy of the first row, so it marks exactly where every comma will land, whatever figure width the system face has. Figures cannot be tweened between widths. A proportional 1 is replaced by a tabular one, not stretched into it, so nothing moves. Both settings share one grid cell, and a single horizontal edge runs down the column in 336ms, linear, about 67ms a row, like a finger running down a ledger. Reach for it on any table, invoice or dashboard where numbers are compared down a column, and before anything that counts or ticks.
The source
A complete HTML document. Paste it into an empty .html file and it plays — no stylesheet, script, font, or image to fetch.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Setting — tabular figures</title>
<style>
:root {
/* Neutrals — fixed, never remixed. */
--ivory: #faf9f5;
--paper: #ffffff;
--oat: #e3dacc;
--slate: #141413;
/* Knobs — the remix API. A knob exists iff declared here and used below. */
--hue: 38.8;
--lift: 0;
--chroma: 1;
--round: 1;
--speed: 1;
/* Accents — derived from the knobs with the family's offsets baked in,
so one hue roll moves them together. Defaults reproduce the original hex
(#d97757 / #b85c3e / #788c5d / #b04a3f). */
--clay: oklch(calc(0.6724 + var(--lift)) calc(0.1308 * var(--chroma)) var(--hue));
--clay-d: oklch(calc(0.5797 + var(--lift)) calc(0.127 * var(--chroma)) var(--hue));
--olive: oklch(
calc(0.6118 + var(--lift)) calc(0.0713 * var(--chroma)) calc(var(--hue) + 88.3)
);
--rust: oklch(
calc(0.5408 + var(--lift)) calc(0.1357 * var(--chroma)) calc(var(--hue) - 10.3)
);
/* Clock — 5.6s, shared across the setting family. The proof mark goes
down at 16%, the correction lands by 32%, the mark is lifted by
56%, and the card resets inside a blank window at 93%. */
--cycle: 5.6s;
--t: calc(var(--cycle) / var(--speed));
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--_read: color-mix(in srgb, var(--slate) 78%, transparent);
--_quiet: color-mix(in srgb, var(--slate) 55%, transparent);
--_row: 1.6em; /* every row, and the proof rule, is a multiple of this */
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
min-height: 100vh;
display: grid;
place-items: center;
padding: clamp(12px, 3vw, 28px);
background: var(--ivory);
color: var(--slate);
font-family:
system-ui,
-apple-system,
'Segoe UI',
Roboto,
sans-serif;
}
.sheet {
width: min(360px, 92vw);
padding: clamp(14px, 3.4vw, 22px) clamp(16px, 3.8vw, 26px);
border: 1px solid var(--oat);
border-radius: calc(14px * var(--round));
background: var(--paper);
}
/* The whole set resets inside one blank window, so the loop never shows
the correction being undone — a fix that visibly reverses reads as a
second animation with the opposite meaning. */
.stage {
animation: seam var(--t) infinite;
}
.eyebrow {
font-size: clamp(11px, 2.4vw, 12.5px);
font-weight: 600;
letter-spacing: 0.09em;
text-transform: uppercase;
color: var(--_quiet);
}
.foot {
margin-top: clamp(12px, 2.6vw, 16px);
padding-top: clamp(9px, 2vw, 12px);
border-top: 1px solid var(--oat);
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 6px 12px;
}
.foot code {
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
font-size: clamp(11px, 2.6vw, 12.5px);
color: var(--_quiet);
white-space: nowrap;
}
/* The state chip rolls on a two-row track rather than crossfading, so no
frame has both words legible. */
.chip {
height: calc(1.6em + 2px);
overflow: hidden;
padding: 0 0.7em;
border: 1px solid var(--oat);
border-radius: 999px;
font-size: clamp(11px, 2.5vw, 12px);
font-weight: 600;
line-height: 1.6em;
color: var(--_quiet);
}
.track {
display: block;
animation: roll var(--t) infinite;
}
.track > span {
display: block;
white-space: nowrap;
}
.track .set {
color: var(--slate);
}
.track .set::before {
content: '';
display: inline-block;
width: 0.45em;
height: 0.45em;
margin-right: 0.4em;
border-radius: 50%;
background: var(--olive);
vertical-align: 0.08em;
}
@keyframes roll {
0%,
32% {
transform: translateY(0);
animation-timing-function: var(--ease-out);
}
36%,
92.9% {
transform: translateY(-50%);
}
93%,
100% {
transform: translateY(0);
}
}
@keyframes seam {
0%,
88% {
opacity: 1;
animation-timing-function: ease;
}
92%,
94% {
opacity: 0;
animation-timing-function: ease;
}
98%,
100% {
opacity: 1;
}
}
.table {
margin-top: clamp(8px, 1.8vw, 12px);
display: grid;
grid-template-columns: 1fr auto;
font-size: clamp(14px, 3.7vw, 16px);
}
/* The gutter is padding on the figures rather than a column gap, so the
total's rule runs unbroken across both columns. */
.col .r {
padding-left: 2em;
}
.names,
.col {
display: grid;
}
.r {
height: var(--_row);
line-height: var(--_row);
white-space: nowrap;
}
.tot {
border-top: 1px solid var(--oat);
font-weight: 600;
color: var(--slate);
}
.names {
color: var(--_quiet);
}
.names .tot {
color: var(--slate);
}
/* Both settings of the column share one grid cell, right-aligned to the
same edge. Figures cannot be tweened between widths — a proportional
1 does not become a tabular one, it is replaced — so nothing moves;
one horizontal edge runs down the column and swaps the setting as it
passes. */
.figs {
position: relative;
display: grid;
color: var(--_read);
}
.col {
grid-area: 1 / 1;
text-align: right;
}
.was {
font-variant-numeric: proportional-nums;
animation: was var(--t) infinite;
}
.now,
.ruler {
font-variant-numeric: tabular-nums;
}
.now {
animation: now var(--t) infinite;
}
/* The proof rule is hung from the thousands comma of an invisible,
tabular copy of the first row, so it sits exactly where every comma
will be once the column is set, whatever the system face's figure
width. The comma rather than the decimal point, because a figure's
position is the sum of every advance to its right: six glyphs in,
proportional 1s against 8s and 0s have drifted far enough to see. */
.ruler {
color: transparent;
pointer-events: none;
}
.ruler .r:not(:first-child) {
visibility: hidden;
}
.dot {
position: relative;
}
.dot::after {
content: '';
position: absolute;
left: 0.1em;
top: calc(0.62em - var(--_row) / 2 + 0.3em);
height: calc(5 * var(--_row) - 0.6em);
width: 1px;
background: repeating-linear-gradient(to bottom, var(--clay) 0 3px, transparent 3px 6px);
animation: guide var(--t) infinite;
}
@keyframes guide {
0%,
16% {
clip-path: inset(0 0 100% 0);
opacity: 1;
animation-timing-function: var(--ease-out);
}
23%,
46% {
clip-path: inset(0 0 0 0);
opacity: 1;
animation-timing-function: ease;
}
56%,
100% {
clip-path: inset(0 0 0 0);
opacity: 0;
}
}
/* 336ms down five rows, linear: 67ms a row, every row getting the same
share of the pass, like a finger running down a ledger. */
@keyframes was {
0%,
26% {
clip-path: inset(0 0 0 0);
animation-timing-function: linear;
}
32%,
92.9% {
clip-path: inset(100% 0 0 0);
}
93%,
100% {
clip-path: inset(0 0 0 0);
}
}
@keyframes now {
0%,
26% {
clip-path: inset(0 0 100% 0);
animation-timing-function: linear;
}
32%,
92.9% {
clip-path: inset(0 0 0 0);
}
93%,
100% {
clip-path: inset(0 0 100% 0);
}
}
@media (prefers-reduced-motion: reduce) {
/* Every travel distance in the piece goes to zero time — positions cut
between their two states inside a frame — while the proof marks,
which say what is about to change and that it changed, keep fading
on a slower clock. */
.stage,
.track,
.was,
.now,
.dot::after {
animation-duration: calc(var(--t) * 1.7);
}
.track {
animation-name: roll-rm;
}
@keyframes roll-rm {
0%,
32.9% {
transform: translateY(0);
}
33%,
92.9% {
transform: translateY(-50%);
}
93%,
100% {
transform: translateY(0);
}
}
.was,
.now,
.dot::after {
clip-path: none;
}
.was {
animation-name: was-rm;
}
.now {
animation-name: now-rm;
}
.dot::after {
animation-name: guide-rm;
}
@keyframes was-rm {
0%,
26% {
opacity: 1;
animation-timing-function: ease;
}
32%,
92.9% {
opacity: 0;
}
93%,
100% {
opacity: 1;
}
}
@keyframes now-rm {
0%,
26% {
opacity: 0;
animation-timing-function: ease;
}
32%,
92.9% {
opacity: 1;
}
93%,
100% {
opacity: 0;
}
}
@keyframes guide-rm {
0%,
16% {
opacity: 0;
animation-timing-function: ease;
}
23%,
46% {
opacity: 1;
animation-timing-function: ease;
}
56%,
100% {
opacity: 0;
}
}
}
</style>
</head>
<body>
<div class="sheet">
<div class="stage">
<p class="eyebrow">Pipeline timings, ms</p>
<div
class="table"
role="img"
aria-label="Pipeline timings in milliseconds: install 1,118.11, build 4,806.90, test 911.41, deploy 2,019.08, total 8,855.50"
>
<span class="names" aria-hidden="true"
><span class="r">install</span><span class="r">build</span><span class="r">test</span
><span class="r">deploy</span><span class="r tot">total</span></span
>
<span class="figs" aria-hidden="true"
><span class="col was"
><span class="r">1,118.11</span><span class="r">4,806.90</span
><span class="r">911.41</span><span class="r">2,019.08</span
><span class="r tot">8,855.50</span></span
><span class="col now"
><span class="r">1,118.11</span><span class="r">4,806.90</span
><span class="r">911.41</span><span class="r">2,019.08</span
><span class="r tot">8,855.50</span></span
><span class="col ruler"
><span class="r">1<span class="dot">,</span>118.11</span
><span class="r">4,806.90</span><span class="r">911.41</span
><span class="r">2,019.08</span><span class="r tot">8,855.50</span></span
></span
>
</div>
<div class="foot">
<code>tabular-nums</code>
<span class="chip" aria-hidden="true"
><span class="track"><span>as typed</span><span class="set">as set</span></span></span
>
</div>
</div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.