CSS Container Style Queries
Using @container style() to switch a component's theme or variant from a custom property set on an ancestor.
Content tagged style-queries
Post:CSS Container Queries Deep Dive: Named Containers,
cqiUnits, and Style QueriesMake components respond to their container, not the viewport.Go beyond basic @container: inline-size vs size containment, named containers, cqi/cqb/cqmin/cqmax units, and style queries, with diagrams and a live sandbox.Tutorial:Conditional CSS Values with the
if()FunctionSwap CSS values by media, supports, or style conditions.The if() function picks between several values inside one CSS declaration based on a media(), supports(), or style() condition — collapsing what used to require duplicating an entire rule under @media/@supports, or a JS class toggle, into one line, with a fallback for browsers that don't support it yet.