Base layout
Cards begin in one column, which works at narrow widths.
This message changes colour at the lesson breakpoint.
Cards begin in one column, which works at narrow widths.
At 48rem or wider, the same cards form three columns.
The breakpoint marks where the cards have enough room, not a named device.
@media (width >= 48rem) applies its declarations only when the viewport is at least 48rem wide — the same idea as min-width: 48rem. Rules outside it remain the fallback.
Range syntax (or the equivalent min-width form) enhances a mobile-first base.
.cards { display: block; }
@media (width >= 48rem) {
.cards {
display: flex;
gap: 1rem;
}
}
/* Equivalent classic form:
@media (min-width: 48rem) { ... } */