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

[css-grid] repeat(auto) issue

From: François REMY <francois.remy.dev@outlook.com>
Date: Mon, 9 Feb 2015 22:22:10 +0100
Message-ID: <DUB405-EAS32523E19B24CCA731D2572CA5270@phx.gbl>
To: "'CSS WG'" <www-style@w3.org>
Hi,

 

There’s something I don’t like the current repeat(auto, …) definition : it doesn’t allow to solve what I think are useful use cases:

 

Let’s figure out I want a grid of items that’s centered horizontally inside a container. The grid is possibly complex (multiple line names per repetition block) and cannot be emulated by a flexbox.

 

If I want the amount of repetition 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.

 

I prefer a definition of “auto” which adapts by attempting to create more repetition as the automatic placement algorithm wrap for the first time. This means multiple passes of the placement)layout for the first line, but this is way better to solve many use cases.

 

Thoughts?

François
Received on Monday, 9 February 2015 21:22:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:28 UTC