Re: [csswg-drafts] [css-contain-2] do we need size containment in a single dimension to enable container queries? (#1031)

> The CQs won't be evaluated again.

This poor wording is my fault. If we need to do another layout pass, which can be the case for e.g. the ancestral scrollbar problem, then the CQ _would_ be evaluated again with the scrollbar effects present. However, if the author then conditionally (based on the scrollbar appearance) restyles things such that a scrollbar would ultimately not be necessary after all, then too bad. You get a useless scrollbar. We're saved by the fact that (in Blink at least) we don't re-layout until we get something stable, we layout at most twice (for the scrollbar case anyway).

I don't think it's very practical to maintain an entirely different page-wide reality where some elements are size-contained. I've assumed that we can cheaply and "locally" compute the would-be-contained size for containers whenever they get a new (actual) size. If that's not true, or if we do have "repeat layout until stable" behavior somewhere in a way which can affect the would-be-contained size, then pinky-promise probably doesn't work.

GitHub Notification of comment by andruud
Please view or discuss this issue at using your GitHub account

Sent via github-notify-ml as configured in

Received on Friday, 4 December 2020 13:08:31 UTC