Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-scroll-snap-1] Define "scrolling operation" #7339

Open
SebastianZ opened this issue Jun 6, 2022 · 1 comment
Open

[css-scroll-snap-1] Define "scrolling operation" #7339

SebastianZ opened this issue Jun 6, 2022 · 1 comment
Labels
css-scroll-snap-1 Current Work

Comments

@SebastianZ
Copy link
Contributor

CSS Scroll Snap mentions the term "scrolling operation" / "scroll operation" in several places, though it doesn't actually define it. It only provides a few examples for types of scroll operations.

The term should be unified throughout the specification and probably be defined in the scrolling methods section or another central place.

Sebastian

@SebastianZ SebastianZ added the css-scroll-snap-1 Current Work label Jun 6, 2022
@SebastianZ
Copy link
Contributor Author

Here's one concrete issue related to this: How should scroll-snap-stop: always actually behave? It is currently defined like this:

The scroll container must not pass over a snap position defined by this element during the execution of a scrolling operation; it must instead snap to the first of this element’s snap positions.

This could be interpreted in two different ways:

  1. Always snap to the first snap position, no matter whether the scrolling operation is still ongoing. I.e. the scrolling operation is forced to stop at the first snap position, even when the scrolling operation isn't finished yet, e.g. because the user is dragging the thumb of a scrollbar or dragging via their finger on a touch device.
  2. Snap to the first snap position after the interaction with the device has finished. E.g. once a user doesn't drag the thumb of a scrollbar anymore or release their finger from a touch device after swiping. That means, while actively scrolling, multiple scroll positions can still be skipped.

It looks like all three main browser engines currently implement the latter, though the specification suggests the former behavior.
So it should be clarified what's meant by "scrolling operation" and with that which one of the two is the correct behavior.

(There are probably use cases for both behaviors. So, depending on the outcome here I may create a separate issue to discuss whether we should introduce the other behavior.)

Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-scroll-snap-1 Current Work
Projects
None yet
Development

No branches or pull requests

1 participant