I have been playing a bit with GridStyleSheets, but having trouble getting an unknown number of elements in a container to have equal widths, equal spacing and span their container. I have been able to achieve this with Flexbox, but having trouble achieving the same result with GSS.
I created 2 CodePens to illustrate what I'm trying to do. Looking to achieve the same result as Flexbox is providing, but using GSS.
CSS/Flexbox - http://codepen.io/davidwickman/pen/BNzxWq
Here you can add or subtract the number of
<article>
tags and the elements flex accordingly.
GSS - http://codepen.io/davidwickman/pen/QbErMR
Here is my attempt at GSS, but I cannot get things to work as expected. Almost seems like I need to divide the width of the container by the count of the
<article>
's and apply that to the article[width]
.
Maybe I'm missing something, maybe there's a better way to go about this to make it work in GSS? Any help is appreciated, thanks!