test(web): reduced motion disables all motion

Also turns off the fold height transition, which the universal selector does not reach (::details-content).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5.5 committed 2026-10-30 20:55:32 +01:00
1 parent 370d381ff4
commit 6bb7681306
3 files changed
+74

No files matched your search

+2
View File
@@ -97,4 +97,6 @@ code, pre { font-family: var(--mono); }
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
/* separate rule: browsers without ::details-content drop only this one */
*::details-content { transition: none !important; }
}
+2
View File
@@ -88,6 +88,8 @@ test("prefers-reduced-motion turns off every animation, transition and view tran
expect(block).toMatch(/::view-transition-group\(\*\)/);
expect(block).toMatch(/::view-transition-old\(\*\)/);
expect(block).toMatch(/::view-transition-new\(\*\)/);
// `*` does not reach ::details-content (fold heights), so it has its own rule.
expect(block).toMatch(/\*::details-content\s*\{\s*transition:\s*none !important/);
});
test("view transitions never take pointer input and keep the header and sidebar still", () => {