[css-grid] repeat(auto) issue

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