Mitcheljager/svelte-confetti

No confetti when Windows animations are disabled

gutnar opened this issue · 3 comments

gutnar commented

Currently the library decides that the confetti should not be displayed at all when prefers-reduced-motion media selector goes through. I think this decision should be left to the users of the library instead. The main problem is that Windows has this one setting to disable animations that affects a very large set of features and this library not working is quite unexpected behavior in that case.

@media (prefers-reduced-motion) {
  .confetti,
  .confetti::before {
    animation: none;
  }
}

This just bit me in the ass while testing. I turned off Win11 OS animations in the VM since it's a bit sluggish, and spent an hour debugging why this broke. Glad to know it's not ghosts, at least. 😅

Fair enough, I'll change it

Fixed in 1.4.0. Animations will always show, but animations can be disabled using disableForReducedMotion