Flexy flex layout for any number n of items such that we have:
at most 3 items on a row
at least 2 items on a row IF we have at least 2 items in total
In only 5 (display, flex-wrap, gap, flex and flex-basis override) CSS declarations, working for any number n of items!
Because someone asked for this on reddit https://www.reddit.com/r/css/comments/1jayx5v/comment/mhq2ldw/
Here is the @codepen demo https://codepen.io/thebabydino/pen/OPJOepJ