Field — character limit
Variant: Character limit
A twenty-character status field, typed nine characters past its limit and backspaced back. The counter is noise until a decision is near, so it is absent until six characters remain, about one short word, and then fades in over 140ms. Tabular figures keep it from wobbling as it changes on every keystroke, and a true minus sign keeps “−3” from reading as a dash. Nothing past the limit is refused or trimmed. Blocking input at the limit silently drops the end of a paste, and the user finds out later. Keeping the overflow, in rust on a rust wash, shows exactly which words have to go and leaves the cut to them. The counter is quiet while it counts down, ink at zero and rust past it, and each flip lands on the keystroke that crosses, with no shake and no flash, because the user is mid-sentence and not wrong yet. The clay ring crossfades to rust in 120ms and back once the count reaches zero. The space that crosses the limit counts but carries no wash, so the mark starts on the first letter. Reach for it on bios, titles, commit subjects and SMS bodies, anywhere a limit is real but a draft runs long. Under reduced motion only the clock changes, because nothing here travels.
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>Field — character limit</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. */
--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. Twenty-nine keys land 60ms apart from 300ms; the
counter appears with six left (1.08s) and goes negative at 1.5s;
a 1.2s read; nine backspaces on a 50ms key-repeat from 3.2s bring
it back to zero at 3.6s; the loop rewinds inside a fade at
4.7–5.2s. */
--cycle: 5.6s;
--t: calc(var(--cycle) / var(--speed));
--_quiet: color-mix(in srgb, var(--slate) 55%, transparent);
--_halo: color-mix(in srgb, var(--clay) 16%, transparent);
--_halo-over: color-mix(in srgb, var(--rust) 16%, transparent);
--_over: color-mix(in srgb, var(--rust) 13%, transparent);
}
/* Curves are written out inside @keyframes, not as tokens: a var() in a
keyframe's animation-timing-function is dropped and falls back to
ease, which would quietly flatten every curve below. */
* {
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;
}
.stack {
display: grid;
gap: 8px;
width: min(300px, 86vw);
animation: seam var(--t) infinite;
}
.title,
.foot {
font-size: 12.5px;
color: var(--_quiet);
}
.title {
font-weight: 600;
letter-spacing: 0.01em;
}
.field {
position: relative;
height: 50px;
border: 1.5px solid var(--oat);
border-radius: calc(12px * var(--round));
background: var(--paper);
font-size: clamp(14.5px, 4.4vw, 16px);
line-height: 22px;
}
.ring,
.ring-over {
position: absolute;
inset: -1.5px;
border: 1.5px solid var(--clay);
border-radius: calc(12px * var(--round));
box-shadow: 0 0 0 3px var(--_halo);
}
.ring {
animation: under var(--t) infinite;
}
.ring-over {
border-color: var(--rust);
box-shadow: 0 0 0 3px var(--_halo-over);
opacity: 0;
animation: over var(--t) infinite;
}
.value {
position: absolute;
top: 12.5px;
left: 15px;
white-space: pre;
}
/* Nothing past the limit is refused or trimmed. Blocking input at the
limit silently drops the end of a paste, and the user finds out
later; keeping the overflow, in rust on a rust wash, shows exactly
what has to go and leaves the cut to them. */
.value span {
--_ink: var(--slate);
--_bg: transparent;
color: transparent;
animation-duration: var(--t);
animation-timing-function: step-end;
animation-iteration-count: infinite;
}
.value span.x {
--_ink: var(--rust);
--_bg: var(--_over);
}
/* The space that crosses the limit counts, but a wash on blank space
reads as a padding glitch, so the mark starts on the first letter. */
.value span.x.gap {
--_bg: transparent;
}
.value span:nth-child(1) {
animation-name: k0;
}
.value span:nth-child(2) {
animation-name: k1;
}
.value span:nth-child(3) {
animation-name: k2;
}
.value span:nth-child(4) {
animation-name: k3;
}
.value span:nth-child(5) {
animation-name: k4;
}
.value span:nth-child(6) {
animation-name: k5;
}
.value span:nth-child(7) {
animation-name: k6;
}
.value span:nth-child(8) {
animation-name: k7;
}
.value span:nth-child(9) {
animation-name: k8;
}
.value span:nth-child(10) {
animation-name: k9;
}
.value span:nth-child(11) {
animation-name: k10;
}
.value span:nth-child(12) {
animation-name: k11;
}
.value span:nth-child(13) {
animation-name: k12;
}
.value span:nth-child(14) {
animation-name: k13;
}
.value span:nth-child(15) {
animation-name: k14;
}
.value span:nth-child(16) {
animation-name: k15;
}
.value span:nth-child(17) {
animation-name: k16;
}
.value span:nth-child(18) {
animation-name: k17;
}
.value span:nth-child(19) {
animation-name: k18;
}
.value span:nth-child(20) {
animation-name: k19;
}
.value span:nth-child(21) {
animation-name: k20;
}
.value span:nth-child(22) {
animation-name: k21;
}
.value span:nth-child(23) {
animation-name: k22;
}
.value span:nth-child(24) {
animation-name: k23;
}
.value span:nth-child(25) {
animation-name: k24;
}
.value span:nth-child(26) {
animation-name: k25;
}
.value span:nth-child(27) {
animation-name: k26;
}
.value span:nth-child(28) {
animation-name: k27;
}
.value span:nth-child(29) {
animation-name: k28;
}
.lead {
position: absolute;
top: 14px;
left: 15px;
width: 2px;
height: 19px;
margin-left: -1px;
border-radius: 999px;
background: var(--clay);
opacity: 0;
animation: lead var(--t) step-end infinite;
}
.foot {
display: flex;
justify-content: space-between;
gap: 12px;
}
/* The counter is noise until a decision is near, so it is absent until
six characters remain — about one short word — then fades in over
140ms. Tabular figures keep the number from wobbling as it changes
every keystroke, and a true minus sign keeps "−3" from reading as
a dash. */
.count {
flex: none;
height: 1.3em;
overflow: hidden;
font-variant-numeric: tabular-nums;
font-weight: 500;
text-align: right;
opacity: 0;
animation:
count-in var(--t) infinite,
count-ink var(--t) step-end infinite;
}
.strip {
display: grid;
line-height: 1.3em;
animation: count var(--t) step-end infinite;
}
@keyframes count {
0% {
transform: translateY(0);
}
19.286% {
transform: translateY(-0em);
}
20.357% {
transform: translateY(-1.3em);
}
21.429% {
transform: translateY(-2.6em);
}
22.5% {
transform: translateY(-3.9em);
}
23.571% {
transform: translateY(-5.2em);
}
24.643% {
transform: translateY(-6.5em);
}
25.714% {
transform: translateY(-7.8em);
}
26.786% {
transform: translateY(-9.1em);
}
27.857% {
transform: translateY(-10.4em);
}
28.929% {
transform: translateY(-11.7em);
}
30% {
transform: translateY(-13em);
}
31.071% {
transform: translateY(-14.3em);
}
32.143% {
transform: translateY(-15.6em);
}
33.214% {
transform: translateY(-16.9em);
}
34.286% {
transform: translateY(-18.2em);
}
35.357% {
transform: translateY(-19.5em);
}
57.143% {
transform: translateY(-18.2em);
}
58.036% {
transform: translateY(-16.9em);
}
58.929% {
transform: translateY(-15.6em);
}
59.821% {
transform: translateY(-14.3em);
}
60.714% {
transform: translateY(-13em);
}
61.607% {
transform: translateY(-11.7em);
}
62.5% {
transform: translateY(-10.4em);
}
63.393% {
transform: translateY(-9.1em);
}
64.286% {
transform: translateY(-7.8em);
}
87.5% {
transform: translateY(0);
}
100% {
transform: translateY(0);
}
}
@keyframes count-in {
0% {
opacity: 0;
}
19.286% {
opacity: 0;
animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
}
21.786% {
opacity: 1;
}
87.482% {
opacity: 1;
}
87.5% {
opacity: 0;
}
100% {
opacity: 0;
}
}
/* Quiet while counting down, ink at zero, rust past it. The flip
lands on the keystroke that crosses, with no shake and no flash:
the user is mid-sentence, not wrong yet. */
@keyframes count-ink {
0% {
color: var(--_quiet);
}
25.714% {
color: var(--slate);
}
26.786% {
color: var(--rust);
}
64.286% {
color: var(--slate);
}
87.5% {
color: var(--_quiet);
}
100% {
color: var(--_quiet);
}
}
@keyframes over {
0% {
opacity: 0;
}
26.786% {
opacity: 0;
animation-timing-function: ease;
}
28.929% {
opacity: 1;
}
64.286% {
opacity: 1;
animation-timing-function: ease;
}
66.429% {
opacity: 0;
}
100% {
opacity: 0;
}
}
@keyframes under {
0% {
opacity: 1;
}
26.786% {
opacity: 1;
animation-timing-function: ease;
}
28.929% {
opacity: 0;
}
64.286% {
opacity: 0;
animation-timing-function: ease;
}
66.429% {
opacity: 1;
}
100% {
opacity: 1;
}
}
@keyframes lead {
0% {
opacity: 1;
}
5.357% {
opacity: 0;
}
87.5% {
opacity: 1;
}
100% {
opacity: 1;
}
}
@keyframes seam {
0% {
opacity: 1;
}
83.929% {
opacity: 1;
animation-timing-function: ease;
}
87.5% {
opacity: 0;
}
89.286% {
opacity: 0;
animation-timing-function: ease;
}
92.857% {
opacity: 1;
}
100% {
opacity: 1;
}
}
@keyframes k0 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
5.357% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
6.429% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k1 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
6.429% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
7.5% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k2 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
7.5% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
8.571% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k3 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
8.571% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
9.643% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k4 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
9.643% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
10.714% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k5 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
10.714% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
11.786% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k6 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
11.786% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
12.857% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k7 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
12.857% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
13.929% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k8 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
13.929% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
15% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k9 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
15% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
16.071% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k10 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
16.071% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
17.143% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k11 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
17.143% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
18.214% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k12 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
18.214% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
19.286% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k13 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
19.286% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
20.357% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k14 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
20.357% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
21.429% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k15 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
21.429% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
22.5% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k16 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
22.5% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
23.571% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k17 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
23.571% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
24.643% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k18 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
24.643% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
25.714% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k19 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
25.714% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
26.786% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
64.286% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
73.214% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
82.143% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
87.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k20 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
26.786% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
27.857% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
63.393% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
64.286% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k21 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
27.857% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
28.929% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
62.5% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
63.393% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k22 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
28.929% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
30% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
61.607% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
62.5% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k23 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
30% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
31.071% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
60.714% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
61.607% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k24 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
31.071% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
32.143% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
59.821% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
60.714% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k25 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
32.143% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
33.214% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
58.929% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
59.821% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k26 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
33.214% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
34.286% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
58.036% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
58.929% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k27 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
34.286% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
35.357% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
57.143% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
58.036% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@keyframes k28 {
0% {
color: transparent;
background: transparent;
box-shadow: none;
}
35.357% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
44.286% {
color: var(--_ink);
background: var(--_bg);
box-shadow: none;
}
53.214% {
color: var(--_ink);
background: var(--_bg);
box-shadow: 2px 0 0 var(--clay);
}
57.143% {
color: transparent;
background: transparent;
box-shadow: none;
}
100% {
color: transparent;
background: transparent;
box-shadow: none;
}
}
@media (prefers-reduced-motion: reduce) {
/* Nothing here travels; typing is stepped and the counter changes
on keystrokes, not in motion. Only the clock changes: 1.6x
slower. */
.stack,
.ring,
.ring-over,
.value span,
.lead,
.count,
.strip {
animation-duration: calc(var(--t) * 1.6);
}
}
</style>
</head>
<body>
<div
class="stack"
role="img"
aria-label="A status field with a twenty-character limit. The counter appears when six characters remain, counts down as the user types past the limit to minus nine, with the extra characters marked in rust rather than cut off; backspacing the extra words brings the counter back to zero."
>
<p class="title">Status</p>
<div class="field">
<div class="ring"></div>
<div class="ring-over"></div>
<span class="value"
><span>B</span><span>a</span><span>c</span><span>k</span><span> </span><span>M</span
><span>o</span><span>n</span><span>d</span><span>a</span><span>y</span><span>,</span
><span> </span><span>o</span><span>f</span><span>f</span><span>s</span><span>i</span
><span>t</span><span>e</span><span class="x gap"> </span><span class="x">a</span
><span class="x">l</span><span class="x">l</span><span class="x gap"> </span
><span class="x">w</span><span class="x">e</span><span class="x">e</span
><span class="x">k</span></span
>
<span class="lead"></span>
</div>
<div class="foot">
<span>Shown beside your name</span>
<span class="count"
><span class="strip"
><span>6</span><span>5</span><span>4</span><span>3</span><span>2</span><span>1</span
><span>0</span><span>−1</span><span>−2</span><span>−3</span><span>−4</span
><span>−5</span><span>−6</span><span>−7</span><span>−8</span><span>−9</span></span
></span
>
</div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.