Let cards form as many readable columns as will fit
Example input
.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
gap: 1rem;
}Expected result
1 → 2 → 3The column count can grow as the container gets wider. Each card aims for at least sixteen rem, but the nested min permits a single card to fit a narrower container. The output indicates possible column counts, not fixed breakpoint values. Test the actual parent width and content rather than assuming the browser window and the card container have the same dimensions.