/** * Enable smooth scrolling on the whole document */ html { scroll-behavior: smooth; } /** Animations can cause issues for users who suffer from motion sickness and other conditions. * Disable smooth scrolling when users have prefers-reduced-motion enabled */ @media screen and (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }