Gecko:CSSScrollSnapping: Difference between revisions

Line 25: Line 25:
* Zero.
* Zero.


When scrolling an element with 'scroll-snap-vertical:mandatory' using UA scrolling mechanisms, the vertical offset gravitates to one of the snapping positions at the end of the scrolling gesture. The details are up to the UA.
When scrolling an element with 'scroll-snap-vertical:mandatory' using selected UA scrolling mechanisms, the vertical offset gravitates to one of the snapping positions at the end of the scrolling gesture.


When scrolling an element with 'scroll-snap-vertical:proximity' using UA scrolling mechanisms, the vertical offset gravitates to one of the snapping positions at the end of the scrolling gesture, if it's "sufficiently close" to the closest snapping position. The details are up to the UA.
When scrolling an element with 'scroll-snap-vertical:proximity' using selected UA scrolling mechanisms, the vertical offset gravitates to one of the snapping positions at the end of the scrolling gesture, if it's "sufficiently close" to a snapping position.


Similarly for 'scroll-snap-horizontal'.
Similarly for 'scroll-snap-horizontal'.
UAs can decide which scrolling mechanisms are subject to scroll snapping. For example, a UA might apply scroll snapping to touch-based panning and keyboard-driven scrolling but not scrollbar thumb dragging. Script-driven scrolling (e.g. setting <tt>scrollLeft</tt> or <tt>scrollTop</tt>) is never affected by scroll snapping.
The details of snapping behavior are up to the UA.


== Issues ==
== Issues ==


* How to handle RTL
* How to handle RTL
1,295

edits