Re: [csswg-drafts] [css-grid][css-contain] Clarify that `contain:size` affects track sizing (#4931)

I don't believe that is the intent of the containment specification. From the spec:

> When calculating the size of the containing box, including when computing its intrinsic size, it must be treated as having no contents.

This is effectively just an early out when computing the intrinsic sizes for an element.

> Then, its contents must then be laid out into the containing box's resolved size.

Any layout algorithm should not then change its behaviour after the above step. E.g. these two cases should render the same:

```html
<div style="display:inline-grid; contain:size;">
  <item style="background:red">Hello Kitty</item>
</div>
```

```html
<div style="display:inline-grid; width: 0px;">
  <item style="background:red">Hello Kitty</item>
</div>
```


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

Received on Thursday, 9 April 2020 15:07:43 UTC