sanitize.css icon indicating copy to clipboard operation
sanitize.css copied to clipboard

Reduced motion preference can be harmful

Open tryggvigy opened this issue 7 months ago • 0 comments

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.

tryggvigy avatar Jun 10 '25 22:06 tryggvigy