Re: [csswg-drafts] [css-grid] Resolving percentage heights of grid items during min-content sizing

[min-size contribution](https://drafts.csswg.org/css-grid/#min-size-contribution) says "... as its specified size (`width` or `height`, whichever matches the relevant axis) ...".  Did you mean to use the term [preferred size](https://drafts.csswg.org/css-sizing-3/#preferred-size-properties) rather than "specified size" here?

Also, I'm still not sure how [min-size contribution](https://drafts.csswg.org/css-grid/#min-size-contribution) results in a row base size of zero in the first grid test above.
Here's a somewhat simplified example: https://wptest.center/#/9tgtf3
The image `height` behaves as auto when calculating its [min-size contribution](https://drafts.csswg.org/css-grid/#min-size-contribution) in the block axis so the resulting min-size contribution is the `outer size` after replacing `height` with used value of `min-height`.  `min-height` is `auto`, thus [AMS](https://drafts.csswg.org/css-grid/#min-size-auto) applies.  There is no "specified size suggestion" (since `height` behaves as auto). The transferred size is 10px (`width:10px` transferred through a 1:1 ratio). Thus the min-size contribution is 10px, which makes the row size 10px.  The final image size is then 10px x 20px since `height:200%` resolves to 2 * the row size during layout.

I don't see anything that would suggest that the second bullet in [Percentage Sizing](https://drafts.csswg.org/css-sizing-3/#percentage-sizing) would apply in this case, since that rule is specifically restricted to "when calculating the min-content contribution". I don't think we're calculating a min-content contribution under the [transferred size suggestion](https://drafts.csswg.org/css-grid/#transferred-size-suggestion). If you want image grid items with a percentage preferred size to contribute zero to the track base size then I think you need to include [min-size contribution](https://drafts.csswg.org/css-grid/#min-size-contribution) too. Something like  "when calculating a min-content or min-size contribution".

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

Received on Saturday, 19 May 2018 23:04:43 UTC