Public site: smoother scrolling #24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "smoother-scrolling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The site sometimes felt choppy while scrolling. I measured it by scrolling the test home page in Playwright (Firefox and Chromium), counting frames that took more than 25 ms.
Cause (Firefox, 1440 px, typical of 3 runs): ~80 of ~580 frames late as it was. With the blur off: ~50. With the fade-in animations off: ~18. With both off: ~3. Fixed hero backgrounds made no difference. At phone width scrolling was already smooth.
Changes
bg-warm/95,bg-white/90), nobackdrop-blur.prefers-reduced-motion(smooth scrolling for anchor links too);scrollReveal.tstimes the first 120 frames while scrolling and switches them off if more than 1 in 10 run late. This setsplain-motionon<html>, remembered in sessionStorage for the rest of the visit.backdrop-bluron public pages, keep animations short, and whatplain-motionis.Tested (Playwright, test stack, home page then /about):
.revealshows at once (opacity 1, no transition).Not tested: real phones or a real GPU. The test browsers render without a graphics card, so the absolute numbers are worse than on real devices. The test box has only 2 cores, so I faked 8 cores to test the frame check.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW