mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-14 18:42:30 +03:00
Apply smooth-scroll when prefers-reduced-motion: no-preference (#31877)
* feat(reboot): apply smooth-scroll when not prefers-reduced-motion * docs(migration): mention scroll-behavior in alpha3 * docs(accessibility): mention scroll-behavior in reduced motion section * docs(accessibility): rewording smooth scroll sentence * feat(variable): introduce enable-smooth-scroll variable * docs(accessibility): reword smooth-scroll sentence Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -47,6 +47,8 @@ For visually hidden interactive controls, such as traditional "skip" links, use
|
||||
|
||||
Bootstrap includes support for the [`prefers-reduced-motion` media feature](https://drafts.csswg.org/mediaqueries-5/#prefers-reduced-motion). In browsers/environments that allow the user to specify their preference for reduced motion, most CSS transition effects in Bootstrap (for instance, when a modal dialog is opened or closed, or the sliding animation in carousels) will be disabled, and meaningful animations (such as spinners) will be slowed down.
|
||||
|
||||
On browsers that support the `prefers-reduced-motion`, and where the user has *not* explicitly signaled that they'd prefer reduced motion (i.e. where `prefers-reduced-motion: no-preference`), Bootstrap enables smooth scrolling using the `scroll-behavior` property.
|
||||
|
||||
## Additional resources
|
||||
|
||||
- [Web Content Accessibility Guidelines (WCAG) 2.1](https://www.w3.org/TR/WCAG21/)
|
||||
|
||||
Reference in New Issue
Block a user