Re: [csswg-drafts] [css-grid] Doubts regarding implied minimum size of images

> Wrt comment B, I'm confused how we got to a row height of 100px.
I guess you mean C because in B the cell is 50x50. As rego explains the item in the second row (the one with text) forces the column to be 100px wide (so the image on the first row). Then when computing rows we end up with a first row of 100px (because the image respects the aspect ratio).

After running the track sizing algorithm we proceed to compute the alignment. The default value for justify-content is stretch, so the column becames 200px wide (the size of the grid container), but the rows are unaffected (we don't run the track sizing algorithm again).

After doing, once the tracks sizes are set, we proceed to layout/reflow the grid items. The image becomes 200px wide (as it has width:100%) and so the height (to respect the aspect ratio). That indeed causes an overflow, but that's the expected behavior in this case.

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

Received on Friday, 24 March 2017 10:06:13 UTC