ScratchAddons / website-v2

The website for Scratch Addons. (version 2)
https://scratchaddons.com
GNU General Public License v3.0
49 stars 38 forks source link

The rows of images shouldn't automatically scroll when the user prefers reduced motion #455

Closed DNin01 closed 2 months ago

DNin01 commented 3 months ago

On our landing page, we have a couple sections with collections of images:

Both of these are a problem for people with vestibular motion triggers, and there should be a way to disable them. The easiest way to do this is with a CSS media query:

@media screen and (prefers-reduced-motion: no-preference) {
  /* Animation */
}

or with matchMedia in JavaScript:

if (!window.matchMedia("(prefers-reduced-motion)").matches) then {
  // Animate
}