Responsive grid column count w/o using media queries?

I want a responsive grid where columns shrink and grow to fill the container: on small viewports, I want one column; on medium viewports, I want two columns; and on large viewports, I want a maximum of three columns.

This is easy to do with media queries as shown here: https://codepen.io/academyoff/full/xxaJabZ

But is there a way to achieve this without media queries?

The problem is, even at the smallest viewport, the cells have enough space to collapse into 3 columns.
Was this page helpful?