I have a layout with boxes. The count of boxes is dynamic depending on what JSON I retrieve from the server. These boxes need to stack in rows and all the contents inside of the boxes must be fully shown, however the the rows with maximum amount of boxes shoulnd't leave any gaps.
I've achieved this by using flex-wrap: wrap
on the parent and flex: 1
on the boxes.
However, if the last row doesn't have as many boxes as the rest of them, they shouldn't strecht all the way to the width of the parent.
As mentioned - the rows with maximum amount of boxes shouldn't leave any gaps and should take up the whole remaining space
Is this even possible? And if it is - how can it be done?
Here is a fiddle showing the problem: https://jsfiddle.net/ymcwnbo2/1/