Closed katydecorah closed 3 years ago
If we make this change, we lose the concept of the uncontrolled grid with the
.col
class. This means you will need to use a.w-*
or.col--auto
class to take advantage of the grid:
I like this! Reducing the scope of individual classes makes Assembly more flexible. We can recommend using col in combination with flex-child-grow to get the old behavior!
When using
grid
to build acol
layout, if there are uneven number of items the last item will go full-width:Reduce test case
This happens because
.col
setsflex-grow: 1
. Since we have two options to allow items to grow.col--auto
and.flex-child-grow
, we should removeflex-grow
from.col
.With this change, it will change the concept of
.col
slightly since the class will depend on other to give its shape within the grid.Which classes benefit from flex-grow?
If we make this change, we lose the concept of the uncontrolled grid with the
.col
class. This means you will need to use a.w-*
or.col--auto
class to take advantage of the grid:.col
withflex-grow
.col
withoutflex-grow
If we make this change, the %-based margins may need a
.w-*
or.col--auto
class:.col
withflex-grow
.col
withoutflex-grow
What alternatives have you tried?
flex-child-no-grow
that will disableflex-grow
. This works, but adds code to Assembly.col
class from each element works, but then you cannot usegrid--gut*
classes to add spacing between elements.