Stop Treating CSS Container Queries Like Traditional Media Queries — Smashing Magazine
Despite broad browser support, container queries remain surprisingly underused and frequently misunderstood.
A very interesting way to distinguish @media and @container queries is the layout type.
Media queries are for the “macro” layout; they look outward. Stuff like page structure, the header that spans the window, footers, main grid layout, system preferences (prefers-color-scheme), device capabilities (touch screens). You know, anything that is majorly true to the entire page structure.
Container queries, I’d say, are for “micro” layouts, i.e., most things that live inside the “macro” layout. We use them when any content needs to responsively fit whatever space it is allocated. Components that come to mind are things like cards, widgets, forms, navigation, and so on.
In other words, think “page layout” vs. “component layout”.