Getting Started with Style Queries | CSS and UI | Chrome for Developers
Style queries allow developers to query a parent element's style values using the @container rule. In Chrome 111, style queries for CSS custom properties are landing stable. Learn how to get started with them.
“Smart” Layouts With Container Queries | CSS-Tricks
Modern CSS keeps giving us a lot of new, easier ways to solve old problems, but often the new features we’re getting don’t only solve old problems, they open
We’ve Got Container Queries Now, But Are We Actually Using Them? – Frontend Masters Boost
CSS developers got the ultimate dream: container queries. But now that they are here, are we actually reaching for them as much as we thought we would?
Self-Modifying Variables: the inherit() Workaround
Style queries will unlock many doors. An ability to alternate a value of any variable that I presented in my previous article might seem to be trivial by itself, but what if there is a hidden depth in how we can utilize it? One interesting case is the ability to emulate `inherit()` — a way to access the previous state of a custom property.
With the container style queries on the horizon, it is a good time to do more experiments with them. In one of my recent experiments, I found out that style queries will allow us to do what the currently specified (but not implemented by anyone) function `toggle()` was supposed to.
Going beyond pixels and (r)ems in CSS - Container query length units - iO tech_hub
In the third part of this series, we’ll look at length units based on the container. Yes, you heard that right, we can finally get some measurements based on a containing element and that just spells awesome in my book. Currently available in all evergreen browsers, these units open up a lot of opportunities to create some smart systems and once again, I will write this up packed with a bunch of demos and cool use cases.
Getting started with CSS container queries | MDN Blog
CSS container queries are a powerful new tool for our CSS layout toolbox. In this post we'll dive into the practicalities of building a layout with container queries.
There’s a pretty good chance that CSS is one of the most consistently used tools in your kit. It’s highly familiar and often used, so much so that it’s easy… Read more
On Container Queries, Responsive Images, and JPEG-XL
With the news that CSS Container Queries have shipped in nearly all stable, modern browsers, it’s time to revisit responsive images and ask how they fit in a container query world. Are we on the right path?
Container Query Units and Fluid Typography | Modern CSS Solutions
To learn more about the behaviors of container query units, we'll explore three fluid typography techniques applied via a "mixin" using custom properties. These upgraded methods will produce truly responsive typography, regardless of context.
Digging Deeper Into Container Style Queries | CSS-Tricks
I wrote up some early thoughts on container style queries a little while back. It's still early days. They're already defined in the CSS Containment Module
@container and :has(): two powerful new responsive APIs landing in Chromium 105 - Chrome Developers
"Container queries and :has() are a match made in responsive heaven. Luckily, both of these features are landing together in Chromium 105. This is a huge release with two highly-requested features for responsive interfaces!"
2022 is shaping up to be a pretty great year for CSS, with a plethora of new features on the horizon. Some are already starting to land in browsers, others are likely to gain widespread browser support in 2022, while for one or two the process may be a little longer. In this article we’ll take a look at a few of them.