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

OK, so, I think you're missing a few things.

- The min-content contribution of an image with a percentage size is zero. See https://drafts.csswg.org/css-sizing-3/#percentage-sizing and https://github.com/w3c/csswg-drafts/issues/765 This is why your first test yields a min-content track height of zero. (The max-content contribution will still be the size of the image, IIRC; but we are not using it in this case.)
- The min-content contribution and max-content contributions of a block are both the height after layout, so the previous rule has no effect on the calculations in the second case. Also percentage heights in auto-sized blocks are always ignored (treated as auto) per CSS2.1. That takes care of the second case.
- You're expecting the third case to be different from the second. And it is, but only because we're supposed to use `auto`, not `min-content` as the min track sizing function. You're right that the min track sizing function should resolve to zero in that case: `overflow` is not `visible` (or `clip`), and thus the automatic minimum size doesn't apply.

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

Received on Thursday, 17 May 2018 17:19:50 UTC