enhancement: Scroll instantly when the user prefers reduced motion
Summary
The prefers-reduced-motion media query allows users to specify an accessibility setting for less animation.
Smooth scrolling can trigger seasickness for some users, so if the user has set this preference, scroll instantly.
No behaviour change when this preference is not set.
What kind of change does this PR introduce?
Feature
For any code change,
- [ ] Related documentation has been updated if needed
- [ ] Related tests have been updated or tests have been added
Couldn't find any applicable doc or tests, let me know if I missed any.
Does this PR introduce a breaking change? (check one)
- [ ] Yes
- [x] No
If yes, please describe the impact and migration path for existing applications:
Related issue, if any:
Tested in the following browsers:
- [ ] Chrome
- [x] Firefox
- [x] Safari
- [ ] Edge
- [ ] IE
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| docsify-preview | ✅ Ready (Inspect) | Visit Preview | Dec 12, 2022 at 10:57AM (UTC) |
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit ca2b750e6131cf37848ab50f9e690937a28d1622:
| Sandbox | Source |
|---|---|
| docsify-template | Configuration |