Reduced motion preference can be harmful

Open
#254 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
css

Research direction

No repository file or test is named. Start by locating the reduced-motion reset discussed in the issue and reproduce the supplied scroll-timeline CSS example in a browser that supports it; done means the default no longer leaves the container permanently transparent for users with reduced motion enabled.

Written by the indexing model from the issue text.

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

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

Dominant language
CSS
Stars
5.3k
Forks
299
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from csstools/sanitize.css

All issues in csstools/sanitize.css

Similar issues

More Accessibility issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.