From 337413e09e76fafaed32b7886dc7323ccb6a22ea Mon Sep 17 00:00:00 2001 From: Jonathan Neal Date: Mon, 10 Jan 2022 22:44:17 -0500 Subject: [PATCH] Use smooth scrolling with reduced motion has no preference (#2355) --- docs/public/index.css | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/public/index.css b/docs/public/index.css index f3fdcc47eb..54e4124fd3 100644 --- a/docs/public/index.css +++ b/docs/public/index.css @@ -2,9 +2,7 @@ box-sizing: border-box; margin: 0; } -html { - scroll-behavior: smooth; -} + /* Global focus outline reset */ *:focus:not(:focus-visible) { outline: none; @@ -21,6 +19,12 @@ html { } } +@media (prefers-reduced-motion: no-preference) { + :root { + scroll-behavior: smooth; + } +} + body { display: flex; flex-direction: column;