diff options
| author | Gaƫl Poupard <[email protected]> | 2020-10-19 11:00:37 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-19 12:00:37 +0300 |
| commit | ed2f43e1b9e160ccc7a887527448a0f19e455a9c (patch) | |
| tree | d1033019f70864abcb99169a57702b52c9d91cdd /scss/_reboot.scss | |
| parent | ece40bcd110c47478fa1316bd099ba59210a231b (diff) | |
| download | bootstrap-ed2f43e1b9e160ccc7a887527448a0f19e455a9c.tar.xz bootstrap-ed2f43e1b9e160ccc7a887527448a0f19e455a9c.zip | |
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 <[email protected]>
Diffstat (limited to 'scss/_reboot.scss')
| -rw-r--r-- | scss/_reboot.scss | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scss/_reboot.scss b/scss/_reboot.scss index 223adfd86..e144c9bf7 100644 --- a/scss/_reboot.scss +++ b/scss/_reboot.scss @@ -27,6 +27,12 @@ :root { font-size: $font-size-root; + + @if $enable-smooth-scroll { + @media (prefers-reduced-motion: no-preference) { + scroll-behavior: smooth; + } + } } |
