Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
flackr opened this issue Jan 22, 2024 · 0 comments
Labels
css-contain-2 Current Work

Comments

@flackr
Copy link
Contributor

flackr commented Jan 22, 2024

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 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.

@flackr flackr added the css-contain-2 Current Work label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-contain-2 Current Work
Projects
None yet
Development

No branches or pull requests

1 participant