Martin Auswöger
I think too that custom properties could help with container query issues. I wrote something about that a while ago: au.si/css-conditions…
Every single browser maker has the same stance when it comes to features—they want to hear from developers at the coalface.
“Tell us what you want! We’re listening. We want to know which features to prioritise based on real-world feedback from developers like you.”
“How about container quer—”
“Not that.”
I don’t think it’s an exaggeration to say that literally every web developer I know would love to have container queries. If you’ve worked on any responsive project of any size, you’re bound to have bumped up against the problem of only being able to respond to viewport size, rather than the size of the containing element. Without container queries, our design systems can never be truly modular.
But there’s a divide growing between what our responsive designs need to do, and the tools CSS gives us to meet those needs. We’re making design decisions at smaller and smaller levels, but our code asks us to bind those decisions to a larger, often-irrelevant abstraction of a “page.”
But the message from browser makers has consistently been “it’s simply too hard.”
At the Frontend United conference in Athens a little while back, Jonathan gave a whole talk on the need for container queries. At the same event, Serg gave a talk on Houdini.
Now, as I understand it, Houdini is the CSS arm of the extensible web. Just as web components will allow us to create powerful new HTML without lobbying browser makers, Houdini will allow us to create powerful new CSS features without going cap-in-hand to standards bodies.
At this year’s CSS Day there were two Houdini talks. Tab gave a deep dive, and Philip talked specifically about Houdini as a breakthrough for polyfilling.
During the talks, you could send questions over Twitter that the speaker could be quizzed on afterwards. As Philip was talking, I began to tap out a question: “Could this be used to polyfill container queries?” My thumb was hovering over the tweet button at the very moment that Philip said in his talk, “This could be used to polyfill container queries.”
For that happen, browsers need to implement the layout API for Houdini. But I’m betting that browser makers will be far more receptive to calls to implement the layout API than calls for container queries directly.
Once we have that, there are two possible outcomes:
But, as Eric Portis points out in his talk on container queries, Houdini is still a ways off (by the way, browser makers, that’s two different conference talks I’ve mentioned about container queries, just in case you were keeping track of how much developers want this).
Still, there are some CSS features that are Houdini-like in their extensibility. Custom properties feel like they could be wrangled to help with the container query problem. While it’s easy to think of custom properties as being like Sass variables, they’re much more powerful than that—the fact they can be a real-time bridge between JavaScript and CSS makes them scriptable. Alas, custom properties can’t be used in media queries but maybe some clever person can figure out a way to get the effect of container queries without a query-like syntax.
However it happens, I’d just love to see some movement on container queries. I’m not alone.
I know container queries would revolutionize my design practice, and better prepare responsive design for mobile, desktop, tablet—and whatever’s coming next.
I think too that custom properties could help with container query issues. I wrote something about that a while ago: au.si/css-conditions…
ericportis.com/shorts/2017/07… I blogged about <a rel=”in-reply-to” href=”adactio.com/journal/12585“>@adactio blogging about container queries</a>.
Here’s @adactio on a subject that’s near and dear to my heart: container queries. adactio.com/journal/12585
Adactio: Journal—Container queries adactio.com/journal/12585
Top story: Adactio: Journal—Container queries adactio.com/journal/12585, see more tweetedtimes.com/helikopterdsgn…
Top story: #web #design Adactio: Journal—Container queries adactio.com/journal/12585, see more tweetedtimes.com/helikopterdsgn…
Top story: Adactio: Journal—Container queries adactio.com/journal/12585, see more tweetedtimes.com/helikopterdsgn…
Top story:web design Adactio: Journal—Container queries adactio.com/journal/12585, see more tweetedtimes.com/helikopterdsgn…
Top story: Adactio: Journal—Container queries adactio.com/journal/12585, see more tweetedtimes.com/helikopterdsgn…
“Without container queries, our design systems can never be truly modular.” adactio.com/journal/12585 by @adactio
Houdini to the rescue? On container queries, from @adactio: bit.ly/2uH3Q8M
Container Queries. Next Step in RWD?adactio.com/journal/12585
“[It’s not an] exaggeration to say that literally every web developer I know would love to have container queries.”adactio.com/journal/12585
RealCSSTricks: “[It’s not an] exaggeration to say that literally every web developer I know would love to have c… adactio.com/journal/12585
No exaggeration, every web developer I know would love to have container queries. adactio.com/journal/12585
Love to see the movement behind container queries. adactio.com/journal/12585
Maybe, just maybe….container queries could take another step forward with Houdini: adactio.com/journal/12585 #webdevgeekout
Container Queries: Houdini to the rescue? — @adactioadactio.com/journal/12585
This is encouraging: @adactio on container queries. adactio.com/journal/12585
Yes, Container-Queries! adactio.com/journal/12585