[csswg-drafts] [css-sizing] Clarify how contain-intrinsic-size affects size containment algorithm (#7519)

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-sizing] Clarify how contain-intrinsic-size affects size containment algorithm ==
CSS Containment has a full algorithm for sizing elements with sizing containment: https://drafts.csswg.org/css-contain-2/#containment-size.

But https://drafts.csswg.org/css-sizing-4/#explicit-intrinsic-inner-size just handwaves

> If an element has an [explicit intrinsic inner size](https://drafts.csswg.org/css-sizing-4/#explicit-intrinsic-inner-size) in an axis, then after laying out the element as normal for [size containment](https://drafts.csswg.org/css-contain-2/#size-containment), the size of the contents in that axis are instead treated as being the explicit intrinsic inner size instead of what was calculated in layout, and layout is performed again if necessary. (If it has an explicit intrinsic inner size in both axises, this implies the first layout can be skipped.)

It's not clear:

- When it says "after laying out the element as normal", does this cover all steps of https://drafts.csswg.org/css-contain-2/#containment-size or only some of them?
- When it says "the contents in that axis are instead treated as being the explicit intrinsic inner size", why didn't we do this from the beginning? Why do a former layout as if there was no content?
- When it says "and layout is performed again if necessary", when it's not necessary?
- When it says "If it has an explicit intrinsic inner size in both axises, this implies the first layout can be skipped", why isn't it always the case?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7519 using your GitHub account


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

Received on Wednesday, 20 July 2022 20:05:46 UTC