W3C home > Mailing lists > Public > www-style@w3.org > February 2015

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

From: François REMY <francois.remy.dev@outlook.com>
Date: Wed, 11 Feb 2015 22:56:01 +0100
Message-ID: <DUB405-EAS1296CDF9369A320A7425ED0A5250@phx.gbl>
To: "'Tab Atkins Jr.'" <jackalmage@gmail.com>
CC: "'CSS WG'" <www-style@w3.org>
± > ± > 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?

Exactly ^_^ I thought it would be clear with my initial mail:

> If I want the amount of repetitions to be constrained by a max-width
> constrain AND by the amount of repetitions required to display all items
> of the grid (to preserve the right horizontal centering), then I’m out
> of luck right now.
Received on Wednesday, 11 February 2015 21:56:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:01 UTC