From 3f824a83f814499f8518fec1ceaaae0933bef49e Mon Sep 17 00:00:00 2001 From: slhx agent Date: Fri, 12 Jun 2026 15:51:39 +0200 Subject: [PATCH] fix(workout): make reduced motion explicit Add an explicit prefers-reduced-motion contract to the phone-first Workout starter and assert the served CSS carries the no-motion policy. req: examples/001 --- examples/workout/templates/workout.css | 11 +++++++++++ examples/workout/tests/e2e.rs | 2 ++ 2 files changed, 13 insertions(+) diff --git a/examples/workout/templates/workout.css b/examples/workout/templates/workout.css index 40fedf6..46517bd 100644 --- a/examples/workout/templates/workout.css +++ b/examples/workout/templates/workout.css @@ -270,3 +270,14 @@ } } } + +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + scroll-behavior: auto !important; + transition-duration: 0ms !important; + animation-duration: 0ms !important; + animation-iteration-count: 1 !important; + } +} diff --git a/examples/workout/tests/e2e.rs b/examples/workout/tests/e2e.rs index d644b10..4fc099e 100644 --- a/examples/workout/tests/e2e.rs +++ b/examples/workout/tests/e2e.rs @@ -70,6 +70,8 @@ fn workout_is_e2e_working_over_http() { assert!(css.text().contains(".command-slate")); assert!(css.text().contains(".finish-card")); assert!(css.text().contains("min-height: var(--tap)")); + assert!(css.text().contains("prefers-reduced-motion: reduce")); + assert!(css.text().contains("animation-duration: 0ms")); let runtime = get(&server, runtime_js_path()); assert_eq!(runtime.status, 200);