csstools / csstools/sanitize.css

Reduced motion preference can be harmful

Open
#254 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
5.3k
Forks
299
PR merge metrics
No merged PRs in 30d

Description

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

```css
@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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.