aboutsummaryrefslogtreecommitdiff
path: root/scss/_reboot.scss
diff options
context:
space:
mode:
authorGaĆ«l Poupard <[email protected]>2020-10-19 11:00:37 +0200
committerGitHub <[email protected]>2020-10-19 12:00:37 +0300
commited2f43e1b9e160ccc7a887527448a0f19e455a9c (patch)
treed1033019f70864abcb99169a57702b52c9d91cdd /scss/_reboot.scss
parentece40bcd110c47478fa1316bd099ba59210a231b (diff)
downloadbootstrap-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.scss6
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;
+ }
+ }
}