Skip to content

176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.

docs: mark the first Pause design as superseded in the Text plan and sheet

matin9498a4da559c
diff --git a/docs/superpowers/plans/2026-09-28-demo-page-rollout-text-typography.md b/docs/superpowers/plans/2026-09-28-demo-page-rollout-text-typography.md
index be3c6174..fe11c59a 100644
--- a/docs/superpowers/plans/2026-09-28-demo-page-rollout-text-typography.md
+++ b/docs/superpowers/plans/2026-09-28-demo-page-rollout-text-typography.md
@@ -152,12 +152,12 @@ git commit -m "fix: keep words whole and spaces even on the Entrance & Exit text
**Interfaces:**
- Produces, for Tasks 4–10:
- The Pause button (markup in Global Constraints). With `data-hb-pause="css"` the shared script pauses the stage's CSS animations itself, by putting the class `hb-paused` on the `.stage` (the stylesheet then holds every CSS animation on the stage and its `::before`/`::after`, overriding the page's own `animation-play-state` only while paused). With `data-hb-pause` without a value, the page pauses its own loop.
- - The event `hb:pause` on `document`, with `event.detail.paused` (`true` or `false`), sent every time the Pause button changes state, in both modes, including when the shared script pauses a loop on arrival under reduced motion. A page whose script runs timers or animation frames listens for it and stops or restarts them; a step already under way may finish.
+ - The event `hb:pause` on `document`, with `event.detail.paused` (`true` or `false`), sent every time the Pause button changes state, in both modes, including when the shared script pauses a loop on arrival under reduced motion. A page whose script runs timers or animation frames listens for it and stops or restarts them; a step already under way may finish. (Superseded for page loops by the owner decision "Pause stops at once": the page freezes its transitions and its one pending timer; see the content sheet preamble.)
- The Slow motion switch as on Rotate In, with `data-hb-slowmo="css"` when the shared script should slow the stage: while it is on, every CSS animation and transition on the stage runs at a third of its speed (`playbackRate` 1/3, including animations that start later); turning it off restores speed 1. Without a value, the page slows its own timings. A page with both CSS animations and its own timers may use `css` for the animations and also scale its own timers while `slow.checked` is true.
- Loops start paused under reduced motion (the shared script does it and sends `hb:pause`); a page's own reduced-motion CSS may simplify the looping movement but must not remove or pause it, or Play would do nothing.
- The reduced-motion note in the player bar: "It starts paused and Slow motion is off because your device is set to reduce motion." (loop with Slow motion), "It starts paused because your device is set to reduce motion." (loop without it); plays-once pages keep "Loop and Slow motion are off because your device is set to reduce motion." On wide screens the note now sits beside the controls instead of on a line of its own.
- The page checks: a loop page has exactly one Pause button, in the player bar, starting in the playing state, and no Replay, Loop or autoplay; every guided-steps page links the same version of the shared files.
- - The browser tool: on loop pages, the desktop run checks that the stage moves, that Pause stops it (after up to 1.5 s for a step under way), that Play starts it again and, with `data-hb-slowmo="css"`, that Slow motion slows every animation on the stage and turning it off restores the speed; the phone run with reduced motion checks that the loop starts paused, stays still and moves after Play.
+ - The browser tool: on loop pages, the desktop run checks that the stage moves, that Pause stops it (within 300ms — superseded from 1.5 s by the owner decision "Pause stops at once"), that Play starts it again and, with `data-hb-slowmo="css"`, that Slow motion slows every animation on the stage and turning it off restores the speed; the phone run with reduced motion checks that the loop starts paused, stays still and moves after Play.
- [ ] **Step 1: Write the failing unit test**
diff --git a/docs/superpowers/plans/2026-09-28-text-typography-content.md b/docs/superpowers/plans/2026-09-28-text-typography-content.md
index c27b2247..e4914dd6 100644
--- a/docs/superpowers/plans/2026-09-28-text-typography-content.md
+++ b/docs/superpowers/plans/2026-09-28-text-typography-content.md
@@ -614,6 +614,7 @@ None: leave out the `details.hb-options` block.
- The slide's `done()` sets it back to `false`. So does `start()`, because its `run++` aborts a slide without calling `done()`.
- `done()` schedules the next hold (`timer=setTimeout(cycle,hold)`) only while the loop is not paused. `start()` follows the same rule: while paused it shows the first word and schedules nothing.
+ **Superseded (owner decision "Pause stops at once"):** the page uses the preamble's wait()/freeze()/thaw() helper; the Pause/Play lines below describe the first design and no longer apply.
The page listens for `hb:pause`:
- `paused` true: `clearTimeout(timer)`. This clears the hold timer only; the slide's own timers are not stored in `timer`. A slide already under way finishes, and its `done()` schedules nothing.
- `paused` false: if `sliding` is true, do nothing; the slide's `done()` will schedule the next hold. If it is false, `clearTimeout(timer)`, then `timer=setTimeout(cycle,hold)`. Only one chain of timers ever runs, so the next Pause always stops the loop.
@@ -689,6 +690,7 @@ None: leave out the `details.hb-options` block.
- The morph's callback sets it back to `false`. So does `start()`, because its `clearTimeout(morphTimer)` can abort a morph without calling the callback.
- The morph's callback schedules the 100ms step to `cycle()` only while the loop is not paused. `start()` follows the same rule: while paused it shows the first word and schedules nothing.
+ **Superseded (owner decision "Pause stops at once"):** the page uses the preamble's wait()/freeze()/thaw() helper; the Pause/Play lines below describe the first design and no longer apply.
The page listens for `hb:pause`:
- `paused` true: if `morphing` is true, do nothing now; the morph finishes and its callback schedules nothing. Clearing `morphTimer` here would stop the morph halfway, with the letters out of sight. If `morphing` is false, `clearTimeout(morphTimer)`, which clears the hold or the 100ms step.
- `paused` false: if `morphing` is true, do nothing; the morph's callback will schedule the next step. Calling `cycle()` here would start a second chain, and its `showWord()` check would also put the old word back mid-morph. If it is false, `clearTimeout(morphTimer)`, then `cycle()`, so the next morph comes after one hold.
@@ -916,6 +918,7 @@ None: leave out the `details.hb-options` block.
The loop is one `setTimeout` chain. `step()` applies the next preset, then sets `stepTimer` for the next `step()`, after Speed + 800ms.
+ **Superseded (owner decision "Pause stops at once"):** the page uses the preamble's wait()/freeze()/thaw() helper; the Pause/Play lines below describe the first design and no longer apply.
The page listens for `hb:pause`:
- `paused` true: `clearTimeout(stepTimer)`. A morph under way finishes; it is a CSS transition.
- `paused` false: `clearTimeout(stepTimer)`, then `step()`, which applies the next preset at once and schedules the one after.