Skip to content

Commit 82d177b

Browse files
committed
style(docs[a11y]): Add reduced-motion guard to view transitions
why: View transition animations ran unconditionally, ignoring users who opted out of motion in their OS settings. what: - Wrap view transition rules in @media (prefers-reduced-motion: no-preference)
1 parent 81ad0fb commit 82d177b

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

docs/_static/css/custom.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,13 @@ img[src*="codecov.io"] {
397397
/* ── View Transitions (SPA navigation) ────────────────────
398398
* Crossfade between pages during SPA navigation.
399399
* Browsers without View Transitions API get instant swap.
400+
* Respects prefers-reduced-motion for accessibility.
400401
* ────────────────────────────────────────────────────────── */
401-
::view-transition-old(root),
402-
::view-transition-new(root) {
403-
animation-duration: 150ms;
402+
@media (prefers-reduced-motion: no-preference) {
403+
::view-transition-old(root),
404+
::view-transition-new(root) {
405+
animation-duration: 150ms;
406+
}
404407
}
405408

406409
/* ── MCP Tool safety badges ──────────────────────────────

0 commit comments

Comments
 (0)