How to Respect Reduced Motion in CSS
A beginner, hands-on guide to respect reduced motion in css with browser inspection, exact code-level changes and verification.
By the end: You will implement and verify respect reduced motion in css on a real local/staging page.
You will implement and verify respect reduced motion in css on a real local/staging page.
Key terms before you start
These definitions make the steps easier to follow and help distinguish controls, files and concepts that can look similar at first.
What you need before starting
- A page you are allowed to edit
- Access to the HTML/CSS/JS or CMS/template that renders it
- A modern browser with Developer Tools
Step-by-step tutorial
Every step is shown below. Work through them in order and use each checkpoint to confirm the result before moving on.
Work on a local or staging copy
Open the project containing the website source. If this is a production site, use a staging copy or backup before structural changes.
A browser page is rendered from source files/CMS output; DevTools edits do not save back to the server.
Move it into the actual source and reload.
Open the page in a modern browser
Load the page, then press F12 or Ctrl+Shift+I (Windows/Linux) to open Developer Tools.
DevTools lets you inspect the DOM, applied CSS, computed sizes, requests and console errors.
Move it into the actual source and reload.
Identify non-essential motion
List keyframes, transitions, parallax, auto-scrolling tickers and animated backgrounds.
Essential status feedback can remain but should not rely on motion alone.
Check whether content starts hidden
Find opacity:0/transform states revealed only by animation.
Reduced-motion rules must not leave content permanently hidden.
Move it into the actual source and reload.
Add prefers-reduced-motion query
Use @media (prefers-reduced-motion:reduce).
The query reflects an OS/browser user preference.
Disable/reduce animations inside
Set animation/transition to near-zero/none for decorative effects and scroll-behavior:auto where appropriate.
Avoid globally breaking functional state transitions that require a final state.
Use the Styles/Computed panels to trace the final value instead of adding stronger selectors blindly.
Enable reduced motion in OS/browser
Turn on the setting and reload.
Developer emulation can also help, but test a real setting when possible.
Move it into the actual source and reload.
Check autoplay components
Verify carousels/tickers do not become inaccessible when motion is stopped.
Provide static access to all important content.
Test the public/staging URL logged out
Open the final URL in a private/incognito window.
CMS/admin sessions can hide caching, permission or styling differences.
Check caching, loaded asset URL, theme/template and logged-out view.
Document the changed file/rule
Record the file/template/component and purpose of the change in the project notes or version-control commit.
Future maintainers should not have to reverse-engineer why a rule exists.
Check caching, loaded asset URL, theme/template and logged-out view.
Reload the real page and reproduce the result after all temporary DevTools edits are gone.
Concrete examples
Copyable example
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration:.01ms !important;
animation-iteration-count:1 !important;
transition-duration:.01ms !important;
scroll-behavior:auto !important;
}
}Troubleshooting
Move it into the actual source and reload.
Check caching, loaded asset URL, theme/template and logged-out view.
Use the Styles/Computed panels to trace the final value instead of adding stronger selectors blindly.
The change has a traceable reason/location.
Continue with these tutorials
Documentation and references
Use these primary and supporting sources to verify current controls, browser behavior and product-specific details.