Recently I started implementing css grid into the application I'm working on and since then I managed to refactor the code into a much cleaner and more cohesive form. Yesterday I got stuck with a problem of filling up the remaining space that's produced by ng-repeating an array of 'sections' that produce divs with different heights. Before I started solving the problem, I thought I already had a solution with grid-auto-flow: dense;
, however, this turned out to work differently than I understood. I'm bothered by not being able to fill the circled space in any way.
My current grid code grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
is dynamically setting the number of columns, but I'm prepared to set on a specific number of columns (for example 2), just so I'll be able to fill the row/column space.
Any help or suggestions would be highly appreciated.