A front-end developer from Mar del Plata, Argentina. Passionate about CSS, accessibility, and JS. Currently working on "just a small fix", as I've been doing for the last 15 years.
It's pretty much the same idea as media queries, only based on the container width instead of the viewport size.
The idea is to build responsive components that can be reused in different webs/apps that might serve them in a great variety of layouts.
There are some concerns like circular dependencies that are preventing CSS from building that kind of stuff, but the CSS working group is already proposing some solutions that we might enjoy in the future.
It's pretty much the same idea as media queries, only based on the container width instead of the viewport size.
The idea is to build responsive components that can be reused in different webs/apps that might serve them in a great variety of layouts.
There are some concerns like circular dependencies that are preventing CSS from building that kind of stuff, but the CSS working group is already proposing some solutions that we might enjoy in the future.
As for right now, for some simple things we can get away with using the flex-grow:9999 hack or some of grid's repeat(auto-fit, minmax()) magic. For more complex stuff, the best approach so far is using a little bit of JS with the Intersection Observer API, as Philip Walton's Responsive Components
Ohhh. Seems amazing... Thanks...