Re: [csswg-drafts] [css-contain-2] Allow scroll position to be restored when element becomes un-skipped with content-visibility (#5869)

At a high level this makes sense, but a few thoughts come to mind which may complicate the design of this.

It seems as though you should be able to query the offset (e.g. scrollTop and scrollLeft) and size (scrollHeight and scrollWidth) forcing a layout if these are no longer fresh. This is similar to querying the bounds of an element within the display locked tree.

When contents change I think we should be as consistent as possible with the behavior where the tree is not locked. I.e. with scroll anchoring we would attempt to anchor to the element at the top of the scroller. I think the same should happen here, where we anchor to the last element that was at the top of the scroller when it was locked.

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5869#issuecomment-759748934 using your GitHub account


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

Received on Wednesday, 13 January 2021 21:25:10 UTC