Is their an simple way in CSS to have a fixed maximum of child items on the same line, before you push the next child elements to a new line?
Use flex-basis.
.child { flex-basis: 33%; }
The percentage must be adapted according to you box-sizing model, and the use of margins and/or padding.