- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 12 Feb 2015 08:51:09 +1100
- To: François REMY <francois.remy.dev@outlook.com>
- Cc: CSS WG <www-style@w3.org>
On Thu, Feb 12, 2015 at 8:48 AM, François REMY <francois.remy.dev@outlook.com> wrote: > ± > 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. Oh! You mean that you may or may not have enough items to fill a single line, and if you don't have enough, you'd like the grid to only generate as many columns as needed? ~TJ
Received on Wednesday, 11 February 2015 21:51:56 UTC