Skip to content
New issue

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

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

Already on GitHub? # to your account

[css-overflow-5] Active marker in 2d scroller? #11198

Open
flackr opened this issue Nov 13, 2024 · 1 comment
Open

[css-overflow-5] Active marker in 2d scroller? #11198

flackr opened this issue Nov 13, 2024 · 1 comment

Comments

@flackr
Copy link
Contributor

flackr commented Nov 13, 2024

When you have a group of scroll targets in a scroller that can scroll in multiple directions, how do you determine which one is active?

Options:

  1. Declare a primary direction to use in some manner. This could be a property on the scrolling container indicating, or on the marker group / pseudo marker group creation. My preference here would be to use something like the primary-overflow-direction from Setting the primary scrolling direction for a scroll container #10060.
  2. Automatically infer a primary direction to use. We could do this until a mechanism for declaring a direction exists / continue to support it with an automatic value. The automatic direction would likely be either the direction with more scrollable overflow.
  3. Use both axes of scroll in the determination of the active marker. We could possibly do this by using the distance from the current target scroll position to the marker's aligned positions.

With options 1 and 2, we could use the single direction as the primary direction but still use the secondary direction when the targeted location in the primary direction is the same. E.g. the first step could be determining the active set of markers on the primary direction, then repeat with the secondary direction.

@flackr
Copy link
Contributor Author

flackr commented Nov 13, 2024

I think I'd propose we go with option 2, choosing the direction with more scrollable overflow, as the primary axis and in the case of a tie choosing the block axis. I could be convinced that for predictability we should go with option 1, however I am somewhat concerned with doing this if we don't have the mechanism for changing the primary axis as many of the use cases we're imagining would be in the non-default horizontal axis.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant