Your post is great, but I would like to add one more detail to make it perfect.
This solution has one problem, you need to have a fixed number of items. If it wraps dynamic content, for instance entries of a blog, this will fail. So to fix this, let's add grid-auto-flow property.
Your post is great, but I would like to add one more detail to make it perfect.
This solution has one problem, you need to have a fixed number of items. If it wraps dynamic content, for instance entries of a blog, this will fail. So to fix this, let's add
grid-auto-flow
property.Then wrapper is safe to freely contain more than 6 items.