Solution
Add scroll-behavior: smooth; to the html selector in style.css or style-v2.css.
This applies to all in-page anchor navigation (e.g. any #section links). One CSS declaration; no JavaScript required.
Acceptance criteria
- In-page anchor links scroll smoothly rather than jumping
- No regressions on any page
- Behaviour is consistent across Chrome, Firefox, and Safari
Note
Respect prefers-reduced-motion. Wrap in a media query:
@media (prefers-reduced-motion: no-preference) {
html { scroll-behavior: smooth; }
}
Solution
Add
scroll-behavior: smooth;to thehtmlselector instyle.cssorstyle-v2.css.This applies to all in-page anchor navigation (e.g. any
#sectionlinks). One CSS declaration; no JavaScript required.Acceptance criteria
Note
Respect
prefers-reduced-motion. Wrap in a media query: