We can't have container queries because of “browser internals” but it's now trivial for a developer to implement them in JavaScript? 🤔 Hmmmmmmmmmm ok 😐
🔥 ResizeObserver has landed in Firefox Nightly! We're one step closer to being able to do high-performance ultra responsive design with no media queries 🥳
10
23
1
213
I thought it was because they could cause cycles?
1
2
I think JavaScript can have infinite loops too but not in my code of course 😇 🤔🤔🤔
2
6
It is because of loops. Gonna admit, it’s a bit esoteric: Inf. loops has always been possible in JS, so RO is not adding anything new here (RO also breaks up loops across frames once detected). We don’t have cyclic dependencies in CSS and we are not gonna start adding them.
3
6
I think we could build container queries on top of CSS containment (need to separate layout-width & layout-height). That is, have container queries in stylesheets on elements with the right containment . Then able to container-query the width given contain:layout-width, etc.
6
1
16
If it's going to happen it needs somebody to drive it, though. It's on my list of "would like to do" projects, but probably not soon.

May 17, 2019 · 9:25 PM UTC

1
3
There is also a path forward if you switch on the inline-available-size of a fragment. Not sure on what the syntax would be but for a bad would example: grid-template-rows: (max-inline-size: 600px) { min-content 100px } else { 200px 100px }
1
2