docs: note that transitions bypass CSS prefers-reduced-motion (#18597)

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
pull/18537/merge
Rudevin 4 days ago committed by GitHub
parent 24130c18e2
commit 388840b1b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -53,6 +53,12 @@ Transitions can have parameters.
{/if} {/if}
``` ```
## Accessibility
Transitions are driven by the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API) rather than by CSS. A global `@media (prefers-reduced-motion: reduce)` rule that zeroes `transition-duration` and `animation-duration` therefore has no effect on them.
Use [`prefersReducedMotion`](svelte-motion#prefersReducedMotion) to adjust (or completely disable) the transition accordingly for devices who request reduced motion.
## Custom transition functions ## Custom transition functions
```js ```js

Loading…
Cancel
Save