You wire up a card grid with the one-liner everyone reaches for: . cards { display : grid ; grid-template-columns : repeat ( auto-fill , minmax ( 240px , 1 fr )); gap : 1rem ; } No media queries, no JavaScript, cards that reflow from four columns down to one as the viewport shrinks. You test it ...

Source: [Dev.to](https://dev.to/parsajiravand/your-grid-has-invisible-columns-auto-fill-vs-auto-fit-3hh1)

Sponsored