diff --git a/docs/superpowers/plans/2026-05-12-prefers-reduced-motion.md b/docs/superpowers/plans/2026-05-12-prefers-reduced-motion.md new file mode 100644 index 00000000..5f8997cb --- /dev/null +++ b/docs/superpowers/plans/2026-05-12-prefers-reduced-motion.md @@ -0,0 +1,260 @@ +# Prefers-Reduced-Motion Audit Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Honor `prefers-reduced-motion: reduce` across `libs/chat` (including a2ui catalog) by injecting one CSS media block at the document root. + +**Architecture:** Single `@media (prefers-reduced-motion: reduce)` block appended to the existing `ROOT_TOKEN_STYLES` in `libs/chat/src/lib/styles/chat-tokens.ts`. Universal `*, *::before, *::after` selector collapses all transition/animation durations to `0.01ms` with `!important`. Six targeted overrides replace infinite-loop indicators (spinner, typing dots, caret, welcome pulse, shimmer skeleton, debug pulse) with static fallbacks via `animation: none !important; opacity: 1 !important`. + +**Tech Stack:** TypeScript template literals (CSS-in-TS), vitest, Angular 21 (jsdom test environment). + +**Reference spec:** `docs/superpowers/specs/2026-05-12-prefers-reduced-motion-design.md` + +--- + +### Task 1: Add reduced-motion CSS block + +**Files:** +- Create: `libs/chat/src/lib/styles/chat-tokens.spec.ts` +- Modify: `libs/chat/src/lib/styles/chat-tokens.ts` + +**Context for the implementer:** + +`ROOT_TOKEN_STYLES` in `chat-tokens.ts` is currently a non-exported `const` (around line 141). The function `ensureChatRootStyles()` injects it as a `