Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[css-scroll-snap-1] Clarify passing by requirement of scroll-snap-stop for different category of scrolling #1552
For examples for scrolling operations with only intended end position what is considered passed by?
Definition 1 seems like a reasonable definition but I think we actually want definition 2 for scrolls with only intended end. Not only it matches the definition used for visibility requirement for such scrolls but also it provides a better UX IMHO. For examples consider a page that has a mandatory snap stop in the middle and the user pans all the way to the bottom of the page and releases their finger (or tabs to get to the only focused element at page bottom). First definition forces them to go back to the middle of the page as we cannot pass that snap point which I don't think is the intended/expected behavior.
For scrolls with only intended direction. I think the correct definition is actually the definition 1.
Also according to earlier IRC discussion, for scrolls with intended direction and end position we want definition 2. Because an inertial scroll is expected to be able to pass a mandatory stop.
So yeah, end-point-only scrolls are definitely not affected by scroll-snap-stop at all. Direction-only scrolls aren't affected, because they always stop at snap points anyway, I think. (Like, if the next snap point is 10px down, and pressing the Down arrow normally moves you 30px down, you'll still stop at that snap point automatically, I think?)
Only direction+endpoint scrolls (momentum-based flings) actually care about scroll-snap-stop.
Okay, the definition now reads
@majido, let us know if this seems clear enough!
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: Clarify passing by requirement of scroll-snap-stop for different category of scrolling
<dael> github: https://github.com/w3c/csswg-drafts/issues/1552
<dael> fantasai: We made some changes to clarify scroll snap stop in respect to different types of scrolling. New definition:
<fantasai> When scrolling with an intended direction, the scroll container can “pass over” several possible snap positions (that would be valid to snap to, if the scrolling operation used the same direction but a lesser distance) before reaching the natural endpoint of the scroll operation and selecting its final scroll position. The scroll-snap-stop property allows such a possible snap position to “trap” the scrolling operation, forcing the scroll containe[CUT]
<fantasai> Values are defined as follows [...]
<fantasai> This property has no effect on scrolling operations with only an intended end position, as they do not conceptually “pass over” any snap positions.
<TabAtkins> Sorry, finally here.
<dael> fantasai: What we decided was it has no effect on a scroll that has an end point but no direction. That includes scrolls where you jump to an element or if you are driving or panning and let go at that point as you're dragging.
<dael> fantasai: Things with a direction like down arrow and page down and momentum scroll are tracked by scroll-snap stop
<dael> astearns: And I see one comment liking to wording.
<dael> fantasai: MaRakow looked it over and sent some comments. We replied. That was offline.
<dael> MaRakow: It seems generally fine. Main thing interesting is the previous lang talked about container, it seemed, though it was in the seciton about elements. I'm generally fine with the defintion unless [missed]
<dael> astearns: Anyone else have an opinion?
<dael> astearns: Objections to closing this issue as resolved?
<dael> RESOLVED: Accept this edit and close issue 1552 as resolved