Opened 4 years ago
Closed 20 months ago
#54852 closed enhancement (wontfix)
Twenty Twenty: Consider less aggressive motion preference styles
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Bundled Theme | Keywords: | needs-patch close 2nd-opinion |
| Focuses: | accessibility, css | Cc: |
Description
Twenty Twenty styles create animations and transitions but then disable all that animation for people who set the reduced motion preference in their browser/OS.
@media ( prefers-reduced-motion: reduce ) {
* {
animation-duration: 0s !important;
transition-duration: 0s !important;
}
}
The theme needs to continue honoring the preference, but it could define each of its animations within a (prefers-reduced-motion: no-preference) media query—and remove the 0s !important styles—instead. That way, the theme would be responsible for its own motion without disabling motion from other stylesheets (from plugins).
Related: #54174 (Twenty Twenty-One)
Change History (3)
Note: See
TracTickets for help on using
tickets.
This feature is implemented as a media query, it can be accessed the same way we access any media query values in JS: using window.matchMedia.
function getPrefersReducedMotion() {
}