Back to the library

Provenance — derived, with working

Variant: Derived

For a figure nobody measured directly: 38% is computed from two runs, and the card shows the working. Each source value is marked in a clay wash in turn, 980ms apart, and its operand fades up into its slot in the formula on a 3px ease-out rise just after it lights — slow enough for the eye to pair each row with its slot. Olive is held back for the verdict, so picking a number up never reads as vouching for it. Once both operands are in, the result wipes on left to right in reading order through a clip-path, and only then does the claim’s dashed rule turn solid. The beat structure is the argument: inputs, arithmetic, result, claim, never the other way round. Reach for it on dashboards, financial summaries and generated reports where a derived number should be reproducible from what is on screen.

statusdatatextcounterloop

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>Provenance — derived, with working</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)
        );

        --_muted: color-mix(in srgb, var(--slate) 52%, transparent);
        --_dash: color-mix(in srgb, var(--slate) 34%, transparent);
        --_pick: color-mix(in srgb, var(--clay) 18%, var(--paper));
        --_slot: color-mix(in srgb, var(--oat) 80%, var(--paper));

        /* Clock — 7s: 1% is 70ms. Each operand is picked up 980ms apart, slow
           enough that the eye can follow it from its source to its slot. */
        --cycle: 7s;
        --t: calc(var(--cycle) / var(--speed));

        --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
      }

      * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }

      body {
        min-height: 100vh;
        display: grid;
        place-items: center;
        background: var(--ivory);
        font-family:
          system-ui,
          -apple-system,
          'Segoe UI',
          Roboto,
          sans-serif;
        color: var(--slate);
      }

      .card {
        width: min(300px, calc(100vw - 32px));
        padding: 14px 16px 13px;
        display: grid;
        gap: 10px;
        border-radius: calc(12px * var(--round));
        background: var(--paper);
        border: 1px solid var(--oat);
        animation: card var(--t) linear infinite;
      }

      /* The reset hides in a dark window at the wrap. */
      @keyframes card {
        0% {
          opacity: 0;
        }
        2.5% {
          opacity: 1;
        }
        95.5% {
          opacity: 1;
          animation-timing-function: var(--ease-out);
        }
        100% {
          opacity: 0;
        }
      }

      .k {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--_muted);
      }

      .claim {
        font-size: clamp(16px, 4.6vw, 19px);
        font-weight: 600;
        line-height: 1.35;
        letter-spacing: -0.01em;
        text-wrap: balance;
      }

      .fig {
        position: relative;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
      }

      .fig::before,
      .fig::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -2px;
      }

      .fig::before {
        border-bottom: 1.5px dashed var(--_dash);
        animation: dash var(--t) linear infinite;
      }

      .fig::after {
        height: 2px;
        background: var(--olive);
        transform: scaleX(0);
        transform-origin: left;
        animation: rule var(--t) linear infinite;
      }

      @keyframes dash {
        0%,
        46% {
          opacity: 1;
          animation-timing-function: ease;
        }
        49%,
        100% {
          opacity: 0;
        }
      }

      @keyframes rule {
        0%,
        46% {
          transform: scaleX(0);
          animation-timing-function: var(--ease-out);
        }
        50.5%,
        100% {
          transform: scaleX(1);
        }
      }

      .ref {
        font-size: 11px;
        font-weight: 700;
        vertical-align: super;
        line-height: 0;
        margin-left: 2px;
        color: var(--_muted);
        animation: ref var(--t) linear infinite;
      }

      @keyframes ref {
        0%,
        46% {
          color: var(--_muted);
          animation-timing-function: ease;
        }
        48%,
        100% {
          color: var(--olive);
        }
      }

      .rows {
        border-top: 1px solid var(--oat);
        padding-top: 9px;
        display: grid;
        gap: 6px;
        font-size: 12px;
        color: var(--_muted);
      }

      .row {
        display: flex;
        align-items: center;
        gap: 7px;
      }

      .n {
        font-size: 11px;
        font-weight: 700;
      }

      .t {
        flex: 1;
        white-space: nowrap;
      }

      .hit {
        position: relative;
        isolation: isolate;
        color: var(--slate);
        font-weight: 600;
        font-variant-numeric: tabular-nums;
      }

      .hit::before {
        content: '';
        position: absolute;
        inset: -1px -3px;
        z-index: -1;
        border-radius: calc(3px * var(--round));
        background: var(--_pick);
        transform: scaleX(0);
        transform-origin: left;
        animation: hit-a var(--t) linear infinite;
      }

      .r2 .hit::before {
        animation-name: hit-b;
      }

      @keyframes hit-a {
        0%,
        10% {
          transform: scaleX(0);
          animation-timing-function: var(--ease-out);
        }
        14.5%,
        100% {
          transform: scaleX(1);
        }
      }

      @keyframes hit-b {
        0%,
        24% {
          transform: scaleX(0);
          animation-timing-function: var(--ease-out);
        }
        28.5%,
        100% {
          transform: scaleX(1);
        }
      }

      /* The working: the figure is shown as the arithmetic that produced it,
         each operand arriving just after its source lights. */
      .calc {
        margin-top: 2px;
        padding: 5px 8px;
        border-radius: calc(6px * var(--round));
        background: var(--ivory);
        color: var(--slate);
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }

      .op {
        position: relative;
        font-weight: 600;
      }

      .op i {
        display: inline-block;
        font-style: normal;
        animation: op-a var(--t) linear infinite;
      }

      .op::after {
        content: '';
        position: absolute;
        inset: 2px -1px;
        border-radius: calc(2px * var(--round));
        background: var(--_slot);
        animation: slot-a var(--t) linear infinite;
      }

      .op.b i {
        animation-name: op-b;
      }

      .op.b::after {
        animation-name: slot-b;
      }

      @keyframes op-a {
        0%,
        13% {
          opacity: 0;
          transform: translateY(3px);
          animation-timing-function: var(--ease-out);
        }
        16.5%,
        100% {
          opacity: 1;
          transform: translateY(0);
        }
      }

      @keyframes slot-a {
        0%,
        13% {
          opacity: 1;
        }
        15%,
        100% {
          opacity: 0;
        }
      }

      @keyframes op-b {
        0%,
        27% {
          opacity: 0;
          transform: translateY(3px);
          animation-timing-function: var(--ease-out);
        }
        30.5%,
        100% {
          opacity: 1;
          transform: translateY(0);
        }
      }

      @keyframes slot-b {
        0%,
        27% {
          opacity: 1;
        }
        29%,
        100% {
          opacity: 0;
        }
      }

      /* The result is wiped on left to right, in reading order, once both
         operands are in — then the claim inherits it. */
      .res {
        display: inline-block;
        font-weight: 700;
        clip-path: inset(0 100% 0 0);
        animation: res var(--t) linear infinite;
      }

      @keyframes res {
        0%,
        38% {
          clip-path: inset(0 100% 0 0);
          animation-timing-function: var(--ease-out);
        }
        43%,
        100% {
          clip-path: inset(0 0 0 0);
        }
      }

      @media (prefers-reduced-motion: reduce) {
        /* One shared 1.6x clock keeps every part in phase. */
        .card,
        .card *,
        .card *::before,
        .card *::after {
          animation-duration: calc(var(--t) * 1.6);
        }

        /* Same beats, no travel: every highlight, operand and rule fades in
           where it will rest. */
        .hit::before,
        .fig::after,
        .op i {
          transform: none;
        }

        .hit::before,
        .op.a i {
          animation-name: on-a;
        }
        .r2 .hit::before,
        .op.b i {
          animation-name: on-b;
        }
        .fig::after {
          animation-name: on-c;
        }
        .res {
          clip-path: none;
          animation-name: on-r;
        }

        @keyframes on-a {
          0%,
          12% {
            opacity: 0;
          }
          15%,
          100% {
            opacity: 1;
          }
        }
        @keyframes on-b {
          0%,
          26% {
            opacity: 0;
          }
          29%,
          100% {
            opacity: 1;
          }
        }
        @keyframes on-r {
          0%,
          38% {
            opacity: 0;
          }
          42%,
          100% {
            opacity: 1;
          }
        }
        @keyframes on-c {
          0%,
          46% {
            opacity: 0;
          }
          49%,
          100% {
            opacity: 1;
          }
        }
      }
    </style>
  </head>
  <body>
    <div
      class="card"
      role="img"
      aria-label="A claim computed from two sources: each source value is highlighted in turn and drops into a formula, the result is revealed, and the claim's dashed underline becomes a solid green rule"
    >
      <span class="k">Claim</span>
      <p class="claim">
        Cache change cut p95 latency <span class="fig">38%</span><sup class="ref">1,2</sup>
      </p>
      <div class="rows">
        <div class="row r1">
          <span class="n">1</span>
          <span class="t">Before · run #4096</span>
          <span class="hit">412 ms</span>
        </div>
        <div class="row r2">
          <span class="n">2</span>
          <span class="t">After · run #4127</span>
          <span class="hit">255 ms</span>
        </div>
        <div class="calc">
          (<span class="op a"><i>412</i></span> − <span class="op b"><i>255</i></span
          >) ÷ <span class="op a"><i>412</i></span> = <span class="res">38.1%</span>
        </div>
      </div>
    </div>
  </body>
</html>

The variant family

Same idea, one axis moved. Compare them side by side before you commit.