I have a simple flex-box layout with a container like:
.grid { display: flex; flex-flow: row wrap; justify-content: space-between; }
If you know the width of spaces between elements in the row and the amount of elements in a row, this would work:
Example: 3 elements in a row, 10px gap between elements
div:last-child:nth-child(3n+2) { flex-grow: 1 margin-left: 10px }