W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2017

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

From: Sergio via GitHub <sysbot+gh@w3.org>
Date: Fri, 24 Mar 2017 10:06:07 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-288981757-1490349966-sysbot+gh@w3.org>
> 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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:09 UTC