[csswg-drafts] [css-contain][css-scroll-anchoring] Scroll into view adjustments for content-visibility: auto (#9833)

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

== [css-contain][css-scroll-anchoring] Scroll into view adjustments for content-visibility: auto ==
In issue #9337 we resolved that the target of a scroll into view would be considered relevant in order to accurately measure the location being scrolled into view. While this works (more or less) for instantaneous scrolls or simple cases, if a smooth scroll is being performed there are likely to be elements revealed during the scroll that may result in the end location being incorrect.

E.g. In this [demo](https://jsbin.com/simuqew/edit?html,css,js,output) the `contain-intrinsic-size` is an under-estimate for the real size. When we start the scroll, the destination scroll offset is calculated based on all of the children between the current location and the target being their `contain-intrinsic-size` but as the scroll progresses their real size is used and the target location moves further away. As a result the scroll does not scroll far enough.

I suspect that we need a more generic solution to this problem. The simplest may be if the target scroll position were also subject to scroll anchoring.

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


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

Received on Monday, 22 January 2024 22:18:12 UTC