RE: [css-grid] repeat(auto) issue

± > In fact, this is very similar to a wrapped "flexbox" layout but with alignment
± constraints which a flexbox layout cannot give you, including "gaps" between
± elements which require specific empty columns.
± >
± > To me, the issue is that the cases for which you can use automatic
± repetition is really too narrow. I would prefer to get something closer to what
± we have for flexboxes.
± 
± So it sounds like you're asking for auto-sized rows in repeat(auto)?
± This doesn't seem to make a lot of sense to me; you only get the flexibility of
± auto-sizing on the items that happen to fit in the first row, but all further
± rows are constrained.  It kinda makes your design responsive to the item
± size, but only the first few items, and I doubt that's all that useful.  If your
± items are regular enough for it to be worthwhile, they're regular enough for
± you to guess at the size and just use that in repeat(auto); if they're not
± regular enough, then the grid constraints on later rows are likely to actually
± be unpalatable, and you're likely better off with a wrapping flexbox.

You didn't quite get it. The items have a known size, and let's say I specify it in repeat(auto, ...). What I say is that the current repeat(auto, ...) definition will either generate columns that aren't used and prevent me from centering the grid (I set width: 100%) or will generate no column (if I set width: auto; max-width: 100%; margin: auto) like I want.

Received on Wednesday, 11 February 2015 21:49:23 UTC