W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2016

Re: [csswg-drafts] [css-grid] Implied Minimum Size of Grid Items

From: Manuel Rego Casasnovas via GitHub <sysbot+gh@w3.org>
Date: Thu, 08 Sep 2016 09:12:50 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-245539645-1473325967-sysbot+gh@w3.org>
Let's see if I'm understanding the last comment. :smile:

Coming back to one of the examples discussed, a grid with a fixed 
track of 20x20:
  <div style="display: grid; grid: 20px / 20px; width: 20px; height: 
20px; border: thick solid; font: 50px/1 Monospace;">
    <div style="background: magenta;">item</div>

It seems to me that the behavior we're looking for is that the item is
 sized to 20x20, and the rest of the text overflows. So it could be 
something like in the following picture:
![Expected output for previous example: a 20x20 magenta block with a 

And that's the default behavior as `align|justify-items` is `stretch` 
by default.

However, if `align|justify-items` is `start` the expected behavior 
would be like the next picture:
![Expected output with align|justify-items: a magenta block filling 
the whole text (bigger than 

If I'm getting it right then we might need to update the spec in a few
* [6.2. Grid Item 

  > Note: The auto value of min-width and min-height affects track 
  > in the relevant axis similar to the flexbox behavior on flex items
 in the main axis.

  Shouldn't say in the "cross axis"?

* [6.6. Implied Minimum Size of Grid 

  > (The effect is analogous to the automatic minimum size imposed on 
flex items in their main axis.)

  Again "cross axis"?

  > However, if the grid item spans only grid tracks that have a fixed
 max track sizing function,
  > its automatic minimum size in that dimension is further clamped to
 less than or equal to
  > the size necessary to fit its margin box within the resulting grid
 area (flooring at zero).

  Does this apply in both `stretch` and `start` case?

GitHub Notification of comment by mrego
Please view or discuss this issue at 
using your GitHub account
Received on Thursday, 8 September 2016 09:12:57 UTC

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