I'm building a site for a client and man I'm having a hard time with CSS Scroll Snap in Chrome...
{{redacted URL}}
I'm using Chrome 109.0.5414.87 on OSX. After the intro animation (FYI I hate these but clients love them) you should see:
- Scrolling from first red section into blue I see a flash
- Scrolling from first red section into blue, often times it will almost get to blue, but then glitch back to red.
- You can actually scroll UP past the top of the page
Works great on Firefox and even Safari (OMG).
All the issues seem to be related to going from first slide to the second.
I have noticed that the length of the scroll-handle seems to change when going from section 1 to 2, I have no idea why but perhaps that is related?
Any tips or help would be most welcomed!
Yes, changing the height during scroll may causes some issues on Chrome. This could happens for example when we use parallax effects.
The explanation : the text may be lower than its "normal" area container.
To fix that : I use the css property
contain
and I set it to'layout'
I use this instead of using a overflow hidden because with overflow hidden I can't have my parallax effects :)
Maybe it could help someone.