CSS, Web, Web Development, Layout.
.grid__container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2vh; } The effect is as follows: If you are interested in this knowledge, you can also read the article “Container Query Solutions with CSS Grid and Flexbox”. In fact, there is another value compared