]> Witch of Git - web/blog/commit
Hide animated GIF stamps if "reduce motion" is on
authorCassie Jones <code@witchoflight.com>
Sat, 18 Jan 2020 00:44:30 +0000 (19:44 -0500)
committerCassie Jones <code@witchoflight.com>
Sat, 18 Jan 2020 00:44:30 +0000 (19:44 -0500)
commit7cfee37eec86c996766f15673723423ad2a3302e
tree84be88c4f0c2cedc35c89d7a3f7cfa3d7b26c598
parent5005c448bc683cec25cd584188cb8a7371dd98e5
Hide animated GIF stamps if "reduce motion" is on

Some people have a hard time dealing with motions near text they're
reading, or just don't want to be dealing with animated content
generally. The (prefers-reduced-motion: reduce) media query is active
when the reader has enabled one of the associated accessibility features
on their device. We can use that to hide the animated "stamps" GIFs
which generally have very short, fast loops.

This code currently uses ".gif" as a proxy for "is animated", which
could be improved by having some additional metadata. Additionally, it
might be nice to have alternate still versions of the gifs displayed
when the animated ones are hidden.
_includes/style.css
webrings.njk