robindouglasjohnson / gruescript

Point-and-click text adventure maker
MIT License
57 stars 14 forks source link

Animate instantly when the user prefers reduced motion #19

Closed LeopoldTal closed 1 year ago

LeopoldTal commented 2 years ago

The prefers-reduced-motion media query allows users to specify an accessibility setting for less animation.

This pull request wraps all animations in helper functions that animate normally if the user prefers full animation, and instantly otherwise. They also accept a flag force (currently unused) to force animation in all cases.