-
Use smooth scrolling for anchor links—but not if the reduce motion accessibility preference is enabled! Found that gem in a @Netlify repo today (git blame says @huguestennier did it 🏆). Copy paste source code from the gist: gist.github.com/zachleat/a7393810acf7890e6bef6a34eaa7b78c
-
On the above method for smooth scrolling only if
prefers-reduced-motion
not enabled: Per suggestions from @ericwbailey & @g16n, I’ve streamlined the above to the following: Copy paste source code from this gist comment: gist.github.com/zachleat/a7393810acf7890e6bef6a34eaa7b78c#gistcomment-3426446