[transitions] Support prefers-reduced-motion by mj12albert · Pull Request #48357 · mui/material-ui (original) (raw)
mj12albert changed the title
Support [all components] Support prefers-reduced-motionprefers-reduced-motion
mj12albert changed the title
[all components] Support [transitions] Support prefers-reduced-motionprefers-reduced-motion
siriwatknp added a commit to siriwatknp/material-ui that referenced this pull request
mui#48357 extracted getAnimationStyles and in doing so moved the '& .child { opacity: 1 }' block to the end of the TouchRippleRipple template, after '& .childLeaving { opacity: 0 }'. With equal specificity the later rule wins, so the leaving child kept opacity 1. A focus (pulsate) ripple keeps pulsateKeyframe on exit, which does not animate opacity, so it relied on the static opacity:0 to vanish on blur; instead it stayed visible until removal ~550ms later. Restore the original rule order and add a comment explaining why order matters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})