Skip to content

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

Open
@flackr

Description

@flackr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions