-
Notifications
You must be signed in to change notification settings - Fork 747
Description
There are many situations in which it may not be possible to scroll to a position that aligns with the natural scrolling position of every marker. For example, in https://flackr.github.io/carousel/examples/carousel/thumbnails/ is is not possible to scroll to a position that centers the first two or last two items. E.g.
In the following scrolling element, it is not possible to scroll the first two boxes to their center snap aligned position:
This means that if the active marker is determined solely by the item closest to being aligned https://drafts.csswg.org/css-overflow-5/#scroll-container-scroll it will not be possible to show the first two / last two as active.
Should we consider a model where the browser tracks the actual element that has requested to be scrolled into view? This would allow the edge elements to show as active when clicking on those markers. This could have additional benefits if we treat this element as the anchor node for anchor node selection as well. Note that subsequent user scrolling would likely undo the active styling.
Alternately, if we can't solve this in a nice way we could add a note recommending authors avoid these situations by:
- adding padding to the edges of their scrolling element, or
- ensuring their scroll marker elements are scrollport sized, or
- enabling infinite / cyclical scrolling as in [css-overflow] Infinite scrolling #5411