I would like to build a dynamically filled grid. The grid has 2 columns but if the number of blocks is odd, I would like the last row to fill both columns. As the blocks are dynamically added, I can't put a class on the last element and I don't know how many blocks there will be.
Expected:
I use grid layout but i miss something :
.container {
display: grid;
grid-template-columns: repeat(2, 1fr);
justify-content: flex-start;
align-items: center;
}