Back to the library

Bulletin — superseded, not deleted

Variant: Supersede

What a feed of notices should do when a new one replaces the last, in the order that keeps a reader safe. The old notice steps down a slot first, 400ms on ease-in-out since it is already on screen; the new one lands in the gap 8px from above on ease-out, so there is never a frame with no current notice and never one with two notices overlapping. Only after the new notice is readable is the old one demoted: its pill crossfades from Current to Superseded, a strike crosses the title at hand speed, linear, and its body line folds away behind a clip-path that keeps the outline rounded. It is not deleted — time, level and title stay, because someone who already acted on it needs to find it and see that it changed. The last beat runs the other way: a "Replaces 14:05" line slides into the new notice, so the link reads from both ends. Under reduced motion the old notice starts in its final slot and nothing travels; the beats keep their order on a 1.5× slower clock. Use it for status pages, incident updates, revised forecasts and any stream where a newer message overrides an older one rather than adding to it.

textalertlisttransitionclip-pathlayoutloop

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>Bulletin — superseded, not deleted</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 — 8s, so 1% is 80ms. The old notice makes room 16–21%, the
           new one lands 19–24%, and only then, 26–37%, is the old one demoted.
           The link back appears at 38%; the view resets behind a fade at 93%. */
        --cycle: 8s;
        --t: calc(var(--cycle) / var(--speed));

        --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
        --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

        --_muted: color-mix(in srgb, var(--slate) 56%, transparent);
        --_faint: color-mix(in srgb, var(--slate) 40%, transparent);
        --_rust-wash: color-mix(in srgb, var(--rust) 13%, var(--paper));
        --_olive-wash: color-mix(in srgb, var(--olive) 18%, var(--paper));
        --_oat-wash: color-mix(in srgb, var(--oat) 55%, var(--paper));

        /* Geometry, fixed so every move is a known distance. */
        --_new-h: 108px;
        --_old-h: 86px;
        --_gap: 8px;
        --_fold: 31px; /* the body line the old notice folds away */
      }

      * {
        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);
      }

      .feed {
        position: relative;
        width: min(300px, calc(100vw - 32px));
        height: calc(var(--_new-h) + var(--_gap) + var(--_old-h));
        animation: feed var(--t) infinite;
      }

      @keyframes feed {
        0% {
          opacity: 0;
          animation-timing-function: var(--ease-out);
        }
        3%,
        93% {
          opacity: 1;
          animation-timing-function: var(--ease-out);
        }
        98%,
        100% {
          opacity: 0;
        }
      }

      .note {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        padding: 10px 13px;
        display: grid;
        align-content: start;
        gap: 4px;
        border-radius: calc(11px * var(--round));
      }

      .meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 18px;
        font-size: 11px;
        font-weight: 600;
        color: var(--_muted);
        font-variant-numeric: tabular-nums;
      }

      .title {
        height: 20px;
        font-size: 15px;
        line-height: 20px;
        font-weight: 650;
        white-space: nowrap;
      }

      .body {
        height: 18px;
        font-size: 13px;
        line-height: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .pill {
        display: grid;
      }

      .pill span {
        grid-area: 1 / 1;
        justify-self: end;
        padding: 1px 7px;
        border-radius: 999px;
        text-align: center;
      }

      /* ---- the new notice ---- */

      .new {
        height: var(--_new-h);
        background: var(--paper);
        border: 1px solid var(--oat);
        opacity: 0;
        animation: new-in var(--t) infinite;
      }

      /* Lands after the old one has made room, never on top of it. */
      @keyframes new-in {
        0%,
        19% {
          opacity: 0;
          transform: translateY(-8px);
          animation-timing-function: var(--ease-out);
        }
        24%,
        100% {
          opacity: 1;
          transform: translateY(0);
        }
      }

      .new .lvl {
        color: var(--rust);
      }

      .cur {
        background: var(--_olive-wash);
        color: var(--olive);
      }

      .ref {
        height: 18px;
        font-size: 12px;
        line-height: 18px;
        color: var(--_muted);
        opacity: 0;
        animation: ref var(--t) infinite;
      }

      .ref b {
        font-weight: 600;
        color: var(--slate);
        font-variant-numeric: tabular-nums;
      }

      /* The last beat: the new notice points back at what it replaced. */
      @keyframes ref {
        0%,
        38% {
          opacity: 0;
          transform: translateX(-4px);
          animation-timing-function: var(--ease-out);
        }
        42%,
        100% {
          opacity: 1;
          transform: translateX(0);
        }
      }

      /* ---- the old notice ---- */

      /* Border and fill are two clipped layers, so the fold keeps a closed,
         rounded outline instead of cutting the bottom edge off. */
      .old {
        height: var(--_old-h);
        padding: 0;
        background: var(--oat);
        transform: translateY(calc((var(--_new-h) + var(--_gap)) / 2));
        animation:
          old-move var(--t) infinite,
          fold-o var(--t) infinite;
      }

      .old .in {
        position: absolute;
        inset: 1px;
        padding: 9px 12px;
        display: grid;
        align-content: start;
        gap: 4px;
        border-radius: calc(10px * var(--round));
        background: var(--paper);
        animation:
          fold-i var(--t) infinite,
          fill var(--t) infinite;
      }

      /* It starts as the only notice, centred; it steps down a slot on
         ease-in-out because it is already on screen, moving A to B. */
      @keyframes old-move {
        0%,
        16% {
          transform: translateY(calc((var(--_new-h) + var(--_gap)) / 2));
          animation-timing-function: var(--ease-in-out);
        }
        21%,
        100% {
          transform: translateY(calc(var(--_new-h) + var(--_gap)));
        }
      }

      /* The fold takes the body line only. Time, level and title stay, so
         anyone who acted on it can still find it and see it was replaced. */
      @keyframes fold-o {
        0%,
        31% {
          clip-path: inset(0 0 0 0 round calc(11px * var(--round)));
          animation-timing-function: var(--ease-in-out);
        }
        37%,
        100% {
          clip-path: inset(0 0 var(--_fold) 0 round calc(11px * var(--round)));
        }
      }

      @keyframes fold-i {
        0%,
        31% {
          clip-path: inset(0 0 0 0 round calc(10px * var(--round)));
          animation-timing-function: var(--ease-in-out);
        }
        37%,
        100% {
          clip-path: inset(0 0 var(--_fold) 0 round calc(10px * var(--round)));
        }
      }

      @keyframes fill {
        0%,
        26% {
          background: var(--paper);
          animation-timing-function: var(--ease-out);
        }
        30%,
        100% {
          background: var(--_oat-wash);
        }
      }

      .old .lvl {
        color: var(--clay-d);
        animation: lvl-ink var(--t) infinite;
      }

      @keyframes lvl-ink {
        0%,
        26% {
          color: var(--clay-d);
          animation-timing-function: var(--ease-out);
        }
        30%,
        100% {
          color: var(--_faint);
        }
      }

      .old .title {
        animation: ink var(--t) infinite;
      }

      @keyframes ink {
        0%,
        26% {
          color: var(--slate);
          animation-timing-function: var(--ease-out);
        }
        30%,
        100% {
          color: var(--_faint);
        }
      }

      .old .title span {
        position: relative;
      }

      /* Struck at hand speed, linear: a pen crossing a line, not an effect. */
      .old .title span::after {
        content: '';
        position: absolute;
        left: -1px;
        right: -1px;
        top: 55%;
        height: 1.5px;
        background: var(--_muted);
        transform: scaleX(0);
        transform-origin: left;
        animation: strike var(--t) infinite;
      }

      @keyframes strike {
        0%,
        26% {
          transform: scaleX(0);
          animation-timing-function: linear;
        }
        30.5%,
        100% {
          transform: scaleX(1);
        }
      }

      .old .cur {
        animation: out var(--t) infinite;
      }

      .sup {
        background: var(--_rust-wash);
        color: var(--rust);
        opacity: 0;
        animation: in var(--t) infinite;
      }

      @keyframes out {
        0%,
        26% {
          opacity: 1;
          animation-timing-function: var(--ease-out);
        }
        29%,
        100% {
          opacity: 0;
        }
      }

      @keyframes in {
        0%,
        26% {
          opacity: 0;
          animation-timing-function: var(--ease-out);
        }
        29%,
        100% {
          opacity: 1;
        }
      }

      @media (prefers-reduced-motion: reduce) {
        :root {
          --t: calc(var(--cycle) * 1.5 / var(--speed));
        }

        /* The old notice starts in its final slot; nothing travels. */
        .old {
          transform: translateY(calc(var(--_new-h) + var(--_gap)));
          animation: fold-o var(--t) infinite;
        }

        /* The order is the message, so the beats stay; nothing travels.
           The new notice fades in, the strike appears whole. */
        .new {
          animation-name: new-rm;
        }
        .ref {
          animation-name: ref-rm;
        }
        @keyframes new-rm {
          0%,
          19% {
            opacity: 0;
          }
          23%,
          100% {
            opacity: 1;
          }
        }
        @keyframes ref-rm {
          0%,
          38% {
            opacity: 0;
          }
          41%,
          100% {
            opacity: 1;
          }
        }
        .old .title span::after {
          transform: none;
          animation-name: in;
        }
      }
    </style>
  </head>
  <body>
    <div
      class="feed"
      role="img"
      aria-label="A new Watch notice arrives above an older Advisory notice; only after it has landed is the old one struck through, folded to its title and marked Superseded, and the new notice links back to the one it replaces"
    >
      <div class="note new" aria-hidden="true">
        <p class="meta">
          <span>14:32 · <span class="lvl">Watch</span></span>
          <span class="pill"><span class="cur">Current</span></span>
        </p>
        <p class="title">Eruption possible</p>
        <p class="body">Be ready to leave the summit area.</p>
        <p class="ref">Replaces <b>14:05</b> Advisory</p>
      </div>
      <div class="note old" aria-hidden="true">
        <div class="in">
          <p class="meta">
            <span>14:05 · <span class="lvl">Advisory</span></span>
            <span class="pill"
              ><span class="cur">Current</span><span class="sup">Superseded</span></span
            >
          </p>
          <p class="title"><span>Ash emission likely</span></p>
          <p class="body">Plume to 2 km, drifting east.</p>
        </div>
      </div>
    </div>
  </body>
</html>

The variant family

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