With "scroll-snap-type: both mandatory", the scroller should always snap to a visible element that has snap position defined on it.
1
2
3
4
5
6
7
8
9
With "scroll-snap-type: both proximity", the scroller can only snap to an element if its snap position is close to the current position.
1
2
3
4
5
6
7
8
9
Scroll vertically and make sure the gray squares at right are not visible. Then the gray squares shouldn't affect snapping to the blue squares.
1
A
2
B
3
C
With "scroll-snap-type: both mandatory", the scroller should always snap to a visible element that has snap position defined on it.
1
2
3
4
5
6
7
8
9
This is written in the old-spec. Only Firefox supports it now.
1
2
3
4
5
6
7
8
9
This is written in the old-spec with proximity. Only Firefox supports it now.
1
2
3
4
5
6
7
8
9