Code 24 spotlight: Oh, snap! The joy and pain of CSS scroll snapping, with Neil Jenkins
Oh, snap! The joy and pain of CSS scroll snapping. with Neil Jenkins
Overview of the Talk
With widespread browser support, you can now use CSS to ensure scrolling can only stop at certain positions. This is great for building native-like experiences on mobile and desktop, and we’ll look at how easy it is to do this for simple use cases, like a 3-image carousel.
But what if you have 300,000 images instead, and need to combine it with dynamic rendering as you scroll? Or want to allow scrolling in either horizontal or vertical dimension, but not both at once? You’ll soon find you’re fighting the browser, and the browser fights back hard. We’ll discover some clever hacks — and gotchas to avoid — so you too can build the snappiest of UIs.
Speaker Background
Neil Jenkins works for Fastmail, where he’s now the Chief Product Officer. For over a decade, he’s lead the UX design and front-end engineering there.
Great reading, every weekend.
We round up the best writing about the web and send it your way each Friday.