[csswg-drafts] [css-grid] Growth limits not increased with min-content contributions of spanning items (#4790)

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

== [css-grid] Growth limits not increased with min-content contributions of spanning items ==
If you have a non-spanning item, https://drafts.csswg.org/css-grid/#algo-single-span-items

> - For min-content maximums:
>    If the track has a `min-content` max track sizing function, set its growth limit to the maximum of the items’ **min-content contributions**.

But for spanning items, https://drafts.csswg.org/css-grid/#algo-spanning-items

> - For intrinsic maximums: Next increase the growth limit of tracks with an intrinsic max track sizing function by distributing extra space as needed to account for these items' **minimum contributions**. [...]

Why do we distribute the min-content contribution in the former case, but only the minimum contribution in the latter?

```css
.grid { display: grid }
.one { grid-template-columns: minmax(0, min-content) }
.two { grid-template-columns: repeat(2, minmax(0, min-content)) }
.item { min-width: 0; background: cyan }
.two > .item { grid-column: span 2 }
```
```html
<div class="grid one">
  <div class="item">Foo</div>
</div>
<div class="grid two">
  <div class="item">Foo</div>
</div>
```
looks like

![](https://user-images.githubusercontent.com/7477678/74775266-a5979180-5295-11ea-952d-fb3bbd9f0c3e.png)

Thus violating

> Note: This step is a simplification of the steps below for handling spanning items, and should yield the same behavior as running those instructions on items with a span of 1.



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

Received on Tuesday, 18 February 2020 20:31:15 UTC