13455 shaares
339 private links
339 private links
The are meant for components or reusable piece of UI.
There is also a trick to detect flexbox wrap (presented by Kevin Powell). The core idea is to allow a flex item to flex-grow: 1 when we query the container’s inline size.
There's also a decision tree available to choose between media and container queries, container-type, CSS flexbox, grid and the layout toolkits.
I find it a great introduction to "why" should we use container queries (instead of the how's presented all over the Internet). Container queries still lack some support depending of how many users can be impacted. Graceful fallbacks with media queries should still be provided as 10-4% of the users don't support it (as stated by caniuse depending of the container query feature).