Re: [csswg-drafts] [css-anchor-position] Better handling of scroll position for fixpos elements on first layout (#10999)

> > What's the definition of first laid out? With container queries and scroll timelines there may be multiple passes where a box flips between being rendered and not in different passes during the same rendering update.  getComputedStyle().width forces a layout, but should probably not be counted as "first laid out".
> 
> The actual spec states it in _slightly_ more detail - it's when it starts generating a box (goes from `display:none` or `display:contents` to another value), and also links this to when CSS Animations are created. So at least `gCS()` won't trigger this, tho indeed, more timing detail is needed in general.

gCS() property access may trigger box generation and animations for sure, but should be irrelevant if we agree on the snapshotting.

> > I think it would make sense to snapshot the scroll position as part of ["run snapshot post-layout state steps"](https://drafts.csswg.org/cssom-view/#run-snapshot-post-layout-state-steps),
> 
> Sounds reasonable to me.
> 
> > and probably consider the element as "first laid out" for the whole resizeObserver loop in https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model to account for changing scroll offsets
> 
> By that you mean, in each pass of the RO loop, recalculate the offsets? That sounds reasonable to me.

Yes.


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


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

Received on Friday, 25 October 2024 07:54:00 UTC