Flex-like grids

Ever wanted to set flexbox to space-(something) and got awful last row layouts, ? Here's an alternative approach using CSS Grid

Resize the frame width to check the how elements grows, shrinks and wraps

Growing / Shrinking width elements

Using auto-fit minmax();

1

2

3

4

5

6

7

8

9

10

11

Fixed width elements, space-around style

Using auto-fit minmax() and justify-items: center

1

2

3

4

5

6

7

8

9

10

11

Fixed width elements, space-between style

Using auto-fit and justify-content:space-between

1

2

3

4

5

6

7

8

9

10

11

Flexbox issue demo

With growing / shrinking elements and space-between

1

2

3

4

5

6

7

8

9

10

11

Flexbox issue demo

With fixed width elements and space-between

1

2

3

4

5

6

7

8

9

10

11