[csswg-drafts] [css-scroll-snap-2] Should SnapEvents report multiple aligned targets? (#10185)

DavMila has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-scroll-snap-2] Should SnapEvents report multiple aligned targets? ==
The snap events [spec](https://drafts.csswg.org/css-scroll-snap-2/#snap-events) defines the SnapEvent [interface](https://drafts.csswg.org/css-scroll-snap-2/#snapevent-interface) as representing only one snapped-to element in each axis. However, it is possible for multiple elements to be visually snapped to, even if a user-agent internally selects only one target. E.g. in this [codepen](https://codepen.io/awogbemila/pen/OJqwqgN) snapping to align to any box also makes the scroller snap-aligned to the other boxes in the row.

It would be good to get a resolution on whether SnapEvents should report all the visually-aligned targets or just the one the user-agent has internally picked.

When a layout change occurs such that previously aligned snap areas are no longer aligned, the scroller will follow the snap area that was selected as the snap target, so it might be better to have SnapEvents expose this single target so that a developer can tell which snap area would be followed through a layout change and style/animate/highlight their snap areas accordingly.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10185 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 9 April 2024 17:02:08 UTC