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

ct-is
container-type: inline-size;
ct-none
container-type: none;
ct-s
container-type: size;

Responsiveness

Target viewport sizes with breakpoint prefixes.

sm:ct-(value)
Small640px
md:ct-(value)
Medium768px
lg:ct-(value)
Large1024px
xxl:ct-(value)
Extra Large1536px

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-(value)