prefers-reduced-motion
The CSS media feature that reports whether the user has asked their operating system to minimise animation.
In more detail
When it matches reduce, components should remove large movement such as sliding, zooming, spinning and parallax, keeping at most gentle fades. Setting duration tokens to zero inside the media query does this across a whole design system.
Example
In the browser: Large movement, zooming and parallax can make people with vestibular disorders dizzy or ill. Wrap such animations in @media (prefers-reduced-motion: no-preference), or replace them with gentle fades when reduce is set.Related terms
- vestibular disorder — A condition of the inner ear and brain's balance system; for affected people, on-screen motion can cause dizziness, nausea or headaches.
- CSS transition — A CSS feature that animates a property smoothly from one value to another over a set time when it changes.
- media query — A CSS rule, written @media, that applies styles only when a condition about the device or user settings is true.
- CSS animation — Changing an element's styles smoothly over time using @keyframes and the animation property, without JavaScript.
- accessibility — Designing and building products so that people with disabilities, including those who use keyboards, screen readers or magnifiers, can use them fully.
Taught in
- Visual Contrast Auditing: Color Blindness & Reduced Motion — Design Systems & Component Engineering
- Modern CSS Animations, Transitions And View Transitions API — Frontend Architecture & Web Platform