CSS Scroll Snap
CSS Scroll Snap — Create smooth, guided scrolling experiences with CSS Scroll Snap: snap types, alignments, padding, and practical gallery patterns. The guide walks through What is Scroll Snap?, scroll-snap-type, scroll-snap-align and scroll-snap-stop, scroll-padding, Carousel and Gallery Patterns. CSS Scroll Snap allows you to control scrolling behavior so that scroll positions snap to specified points. Instead of free-form scrolling, the browser automatically adjusts the final scroll position to align with defined snap positions. Scroll snap requires two components: the scroll container (the element that scrolls) and the snap positions (the children that define where scrolling stops). .scroll-container {… The scroll-snap-type property is set on the scroll container and defines the snap axis and strictness: .scroll-container-x { scroll-snap-type: x mandatory; /* Horizontal, must snap */ } .scroll-container-y { scroll-snap-type: y proximity; /* Vertical, snap if close */ } .scroll-container-both { scroll-snap-type: both mandatory; /* Both axes */ } Axis values: - x: Snap on horizontal scroll - y: Snap…