sanitize.css
sanitize.css copied to clipboard
Reduced motion preference can be harmful
Hey folks, with scroll- and view-timeline animations around the corner. I think the reduced motion preference reset might not be a good default recommendation anymore. It can cause UI breakages on browsers that support these alternative timeline animations and reduced motion preference is active.
For example
@keyframes to-transparent {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
.container {
animation-name: to-opaque;
animation-timeline: --scrollTimeline;
animation-fill-mode: both;
}
will cause .container to be permanently transparent for users with reduced motion preference.
I'm happy to open a PR.