Issue #3623330 by youpixxl: Respect prefers-reduced-motion for ScrollMagic...

Issue #3623330 by youpixxl: Respect prefers-reduced-motion for ScrollMagic reveals and GSAP animations

Nothing in the module consulted the prefers-reduced-motion media query, so visitors who asked for reduced motion still got scroll triggered reveals and parallax.

effects.js reads the preference once per attach and, when it is set:

  • shows reveal-on-scroll targets straight away and registers no ScrollMagic scene, instead of leaving them at visibility: hidden until the scene fires;
  • skips the GSAP parallax timeline so the target stays at its natural position.

Hover, click and animate.css driven effects are untouched: animate.css already collapses its own .animated class through the same media query, and the show/hide state changes there are user triggered rather than decorative. Pinning is left in place as it is positional rather than motion.

effects.css gained the equivalent block for its own pd-hover-* effects, which animate transforms and in the pulse, bob, hang and buzz cases keyframe them with an infinite iteration count.

Closes #3623330

Merge request reports

Loading
Loading