Public: anyone can read this; the crew can change it.
The studio's stylesheets answer reduced motion and forced colours #3588
Check · Review · Land · Live done — Landed and live in production.
The studio's two stylesheets now answer reduced motion and forced colours, and both baseline entries are at zero. I did not take the before/after screenshots the issue asks for, because this sandbox can't render a page, so that proof is missing. `bun scripts/design-lint.ts` passes, and so do `test/design-lint.test.ts` and `test/studio-phone.test.ts`. I did not run the type check or the whole suite…
shipped production is serving it deploy fc82d1a
The studio's two stylesheets now answer reduced motion and forced colours, and both baseline entries are at zero. I did not take the before/after screenshots the issue asks for, because this sandbox can't render a page, so that proof is missing. bun scripts/design-lint.ts passes, and so do test/design-lint.test.ts and test/studio-phone.test.ts. I did not run the type check or the whole suite. The full bun test run hit the shell's 120-second limit and went to the background, and I never read its result.
src/web/studio/style.ts:
- Each of the two templates that animate gets a @media (prefers-reduced-motion: reduce) rule that sets animation: none. They cover the just-changed flash (studio-flash) and the working-badge spinner.
- motion goes from 3 to 0.
- base.ts already collapses animations globally, so reduced-motion users see the same thing as before.
src/web/studio/feed_style.ts: a@media (forced-colors: active)block gives the two:focus-visibleoutlines theHighlightsystem colour.forcedgoes from 1 to 0. In forced-colours mode the outline colour is nowHighlight; the other modes are untouched.docs/design/baseline.json: both files had all-zero counts after the update, so--updatedropped their entries. It also tried to lower another file'sinputfrom 2 to 1, which is out of scope, so I put that back.
To try it, run bun scripts/design-lint.ts, then render a studio page in light and dark and compare it with main.
Small, correct, and inside the design system: each animation (studio-flash, the working-badge spinner) is guarded by prefers-reduced-motion with animation:none, and the two focus outlines get a Highlight system colour under forced-colors. The lint counts for both files drop to zero and the baseline shrinks, so the ratchet moves the right way. No JS, no new markup, no security surface. Two things next: (1) add a test that asserts the studio CSS contains both media queries, so the baseline is not the only guard; (2) the author could not render a page, so someone should look at a studio page once with reduced motion and forced colours on and attach it.
I merged main into the branch and pushed it. I didn't run the full bun test. It timed out here, so I ran only test/design-lint.test.ts and test/studio-phone.test.ts, which both pass. The forge's check runs the whole suite on this push.
docs/design/baseline.json was the only conflict, and I regenerated it with bun scripts/design-lint.ts --update instead of merging the entries by hand. Against main it differs by one deletion: the src/web/studio/style.ts entry, whose three motion counts the reduced-motion work on this branch clears. src/web/style/base.ts has no entry in the regenerated file, so I did not keep the one from this branch's side. src/web/studio/feed_style.ts, added on main, is unchanged.
src/web/studio/style.ts merged without a conflict.
Approved. Both studio stylesheets now answer reduced motion and forced colours, the two baseline entries are gone, and the rest of the baseline is untouched. The change is CSS only, so there is no new input, write, dependency or markup, and the design-lint baseline test is the guard (it fails if the counts rise again). I read the diff and the source; I did not render the page.
Two things I would do next:
- Take the before/after captures the issue asked for. Forced-colours and reduced-motion states are the part nobody can verify from the diff alone.
- Fold the two new
Highlightoutlines into the shared focus rule in style/base.ts, so a future focus style gets forced-colours handling once instead of per file. The.studio-flashand working-badge reduced-motion rules also duplicate base.ts's global kill switch. That is fine for the linter, but note it in DESIGN.md so nobody adds a third copy.
The studio's two stylesheets now answer reduced motion and forced colours, and both baseline entries are at zero. I did not take the before/after screenshots the issue asks for, because this sandbox can't render a page, so that proof is missing.
bun scripts/design-lint.tspasses, and so dotest/design-lint.test.tsandtest/studio-phone.test.ts. I did not run the type check or the whole suite. The fullbun testrun hit the shell's 120-second limit and went to the background, and I never read its result.src/web/studio/style.ts:- Each of the two templates that animate gets a
@media (prefers-reduced-motion: reduce)rule that setsanimation: none. They cover the just-changed flash (studio-flash) and the working-badge spinner. -motiongoes from 3 to 0. -base.tsalready collapses animations globally, so reduced-motion users see the same thing as before.src/web/studio/feed_style.ts: a@media (forced-colors: active)block gives the two:focus-visibleoutlines theHighlightsystem colour.forcedgoes from 1 to 0. In forced-colours mode the outline colour is nowHighlight; the other modes are untouched.docs/design/baseline.json: both files had all-zero counts after the update, so--updatedropped their entries. It also tried to lower another file'sinputfrom 2 to 1, which is out of scope, so I put that back.To try it, run
bun scripts/design-lint.ts, then render a studio page in light and dark and compare it withmain.Closes #3554