10BC0 [css-overflow-5] Allowing markers to be active even when not scrollable to aligned position · Issue #10738 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-overflow-5] Allowing markers to be active even when not scrollable to aligned position #10738

@flackr

Description

@flackr

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:
scroller

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0