Make progress animation respect $enable-transitions and prefers-reduced-motion media query#27986
Conversation
|
The carousel fade was already fixed in a previous change to the carousel. Also, the |
andresgalante
left a comment
There was a problem hiding this comment.
Do you think it's worth making the prefer reduce motion media querie global, somethink like:
@media (prefers-reduced-motion: reduce) {
* {
animation: none !important;
transition: none !important;
}
}|
Thought about that Andres, but this will override all transitions everywhere and that could lead to unexpected behaviour on custom code or css plugins. The animation is something we can't do because the spinners would freeze. |
|
@patrickhlauke, can you have a look if this looks fine to you? |
|
in principle this looks fine. i'd note that reduced motion is primarily about stuff that can cause trouble (read: feelings of nausea etc) to users with vestibular disorders, so mainly animated scrolling effect, accordion-type panels that animate open/close, etc. i'm sure that some folks will argue that progress bar animations are fine and could be left on even when the preference is set...but i'd say let's put a stake in the ground and go with this, we can always selectively reenable it later. |
$enable-transitions and prefers-reduced-motion media query
Fixes #25709
Prevent progress animation if transitions are disabled or reduce motion is enabled.
If
$enable-transitionsis false:@keyframes progress-bar-stripesand.progress-bar-animatedare not rendered.If reduced motion is enabled:
animation: none;