From fc5092fb651487e69737fff04d3979f00c67dcc6 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Wed, 9 Aug 2023 19:59:20 +0530 Subject: [PATCH] fix(a11y/theme): disable transitions if user prefers reduced motion --- src/client/theme-default/styles/base.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/client/theme-default/styles/base.css b/src/client/theme-default/styles/base.css index 5e45af7c7d82..7505df4af61a 100644 --- a/src/client/theme-default/styles/base.css +++ b/src/client/theme-default/styles/base.css @@ -1,3 +1,17 @@ +@media (prefers-reduced-motion: reduce) { + *, + ::before, + ::after { + animation-delay: -1ms !important; + animation-duration: 1ms !important; + animation-iteration-count: 1 !important; + background-attachment: initial !important; + scroll-behavior: auto !important; + transition-duration: 0s !important; + transition-delay: 0s !important; + } +} + *, ::before, ::after {