From b2fe8acbfeedbfff6b49019764e56570555be392 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 15 May 2026 09:02:42 +0000 Subject: feat(a11y): respect prefers-reduced-motion Add a global reduced-motion media query that collapses animation and transition durations and disables smooth scroll. Skip Lenis init when the same preference is set so the JS-driven smooth scroll falls back to the browser default, which the spec already honours. --- src/styles/normalise.css | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/styles/normalise.css') diff --git a/src/styles/normalise.css b/src/styles/normalise.css index a3e623f0..f38ff649 100644 --- a/src/styles/normalise.css +++ b/src/styles/normalise.css @@ -35,3 +35,14 @@ h5:before, h6:before { content: "" !important; } + +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } +} -- cgit v1.2.3