@ Released in Browsers
CSS Containment Level 3 defines Container Queries and container-relative units – allowing authors to build more intrinsic responsive components without knowledge of the overall layout.
Specification for Container Queries & Units
Bookmark from W3C CSS Working Group
Media-queries allow an author to make style changes
based on the overall viewport dimensions –
but in many cases,
authors would prefer styling modular components
based on their context and available space within a layout.
Earlier this year,
David Baron & Brian Kardell
proposed two complementary approaches to explore:
a @container
rule,
and a switch()
function.
Both could be useful in different cases.
This specification builds on David Baron’s @container
approach,
with a syntax that is similar to media queries.
We also define ‘container-relative units’ (cq*
)
that match the existing ‘viewport-relative units’ (v*
).
– » talk
» podcast @ Shop Talk Show
» podcast @ Learn With Jason
» podcast @ PodRocket
– » talk
– » talk
» post
– » talk
» elsewhere @ OddBird.net
» podcast @ PodRocket
» podcast @ Word Wrap Show
» podcast @ Morten Rand-Hendriksen
– » talk
» podcast @ Front End Nerdery
» podcast @ Syntax.fm
» podcast @ Word Wrap Show
» podcast @ The F-Word
» post @ OddBird CSS Sandbox
– » talk
» spec @ W3C CSS Working Group