Create CSS Motion That Respects User Preferences

8 steps · about 3 h 10 min · Intermediate

  1. Start with state-to-state transitions (guide, MDN Web Docs, 25 min)

    Animate a deliberate property change and understand duration, delay and timing functions.

  2. Control transitions for discrete properties (reference, MDN Web Docs, 20 min)

    Use allow-discrete carefully when an interface needs entry or exit state changes.

  3. Build a keyframe animation (guide, MDN Web Docs, 30 min)

    Define keyframes and connect timing, direction, iteration and fill behavior to an element.

  4. Shape pacing with timing functions (reference, MDN Web Docs, 20 min)

    Choose easing or steps that communicates the intended change without distracting motion.

  5. Prefer compositor-friendly animation properties (guide, web.dev, 30 min)

    Use transform and opacity where possible and verify that motion avoids expensive layout and paint work.

  6. Detect reduced-motion preferences (reference, MDN Web Docs, 20 min)

    Offer a calmer alternative for people who request less non-essential movement.

  7. Design a useful reduced-motion mode (guide, web.dev, 25 min)

    Reduce, replace or remove motion while preserving status and navigation cues.

  8. Debug and refine animation behavior (guide, MDN Web Docs, 20 min)

    Handle repeated animations and browser events while keeping the final behavior understandable.