Container Type
Set the type of containment used for a container query.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
Usage
Inline Size
Establish a query container for dimensional queries on the inline axis.
<div class="ct-is ..."> <!-- Container query target --></div>Size
Establish a query container for dimensional queries on both the inline & block axes.
<div class="ct-s ..."> <!-- Container query target --></div>None
The element is not a query container.
<div class="ct-none ..."> <!-- Not a container --></div>Responsiveness
Target viewport sizes with breakpoint prefixes.
sm:ct-*Small≥640px
md:ct-*Medium≥768px
lg:ct-*Large≥1024px
xxl:ct-*Extra Large≥1536px
Hover State
Apply styles conditionally on hover using the h: prefix.
Add the h: prefix to apply styles only when the user hovers over the element.
Syntax:
h:ct-*