Is there a way to fill a grid from the center?
I have a CSS grid container which has a dynamic content(it gets updated so the number of children is not fixed) that looks like this:
#container {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
}
and if I had all 4 columns filled it would look like this :
1 2 3 4 //Numbers that represent containers children
Which is okay for me, but the problem comes when I have, for instance, only two divs inside my main container and then it looks like this:
1 2 0 0
And what I would like to achieve is this:
0 1 2 0