v156 · scroll-snap-type: pair · canonical 2d comparison
Both vs. pair 2D canvas
Card A sits at (40, 260) and Card B sits at (260, 40). With scroll-snap-type: both mandatory, scrolling near the top-left corner snaps X to Card A's 40px and Y to Card B's 40px — landing at the empty phantom coordinate (40, 40). Switching to scroll-snap-type: pair mandatory forces the scroll container to pick a single real element for both axes.
Interactive 2D snap container
Live CSS & computed style
| metric | measured value |
|---|