- From: David A via GitHub <sysbot+gh@w3.org>
- Date: Wed, 30 Apr 2025 15:01:36 +0000
- To: public-css-archive@w3.org
DavMila has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-overflow-5] Missing determine scroll-into-view params? == The [example](https://drafts.csswg.org/css-overflow-5/#example-d2ca6884) on how to determine the active scroll marker in the css-overflow-5 spec directs user agents to run the [determine-the-scroll-into-view-position](https://drafts.csswg.org/cssom-view-1/#determine-the-scroll-into-view-position) algorithm but does not provide `block` and `inline` arguments which determine the alignment of the scroll container with its subject and default to "nearest". I believe the intention for snap targets was to use the alignment indicated by `scroll-snap-align` but for non-snap targets, it seems we'd naturally be defaulting to "nearest". However, "nearest" might not be the best option as it means the [`target position`](https://drafts.csswg.org/css-overflow-5/#:~:text=the%20associated%20target%20position%20of%20target), which is used to determine whether a target is [within half a scroll port](https://drafts.csswg.org/css-overflow-5/#:~:text=target%20position%20%3C%20position%20+%20scrollport%20size%20/%202) from the current scroll position, might have the target outside the viewport. I.e. the "nearest" scroll position that brings the element into view might be half a scroll port away from the current scroll position while the target's position itself is not. (See [demo](https://codepen.io/awogbemila/pen/myyqQgq)) I propose we we have the algorithm supply "start" `block` and `inline` values as these would ensure that the target is within view when selected. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12136 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 30 April 2025 15:01:38 UTC