Skip to content

Instantly share code, notes, and snippets.

@resource11
Last active December 10, 2023 17:04
Show Gist options
  • Save resource11/ab29353f1df1a72c32a3dd95f5f75e5b to your computer and use it in GitHub Desktop.
Save resource11/ab29353f1df1a72c32a3dd95f5f75e5b to your computer and use it in GitHub Desktop.
A CSS snippet for leveraging a smooth scroll behavior in an accessible manner
/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
@Schomalet
Copy link

thanks, it really helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment