[csswg-drafts] [css-sizing] Clarify contain-intrinsic-size:none vs 0 (#7518)

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

== [css-sizing] Clarify contain-intrinsic-size:none vs 0 ==
From https://drafts.csswg.org/css-contain-2/#containment-size

> The [intrinsic sizes](https://drafts.csswg.org/css-sizing-3/#intrinsic-size) of the [size containment box](https://drafts.csswg.org/css-contain-2/#size-containment-box) are determined as if the element had no content, following the same logic as when [sizing as if empty](https://drafts.csswg.org/css-contain-2/#sizing-as-if-empty).

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

> 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.

I don't really get the difference between sizing as there was no content, vs sizing as if the contents had a size of 0.

This case shows a difference in Blink:

```html
<img src="image" style="border: solid; contain: inline-size; contain-intrinsic-width: none">
<img src="image" style="border: solid; contain: inline-size; contain-intrinsic-width: 0">
```

The 1st image has its natural width, the 2nd one is 0px wide. Not sure if this is correct.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7518 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 19:54:50 UTC