Skip to main content

Container Type

Make an element a container its children can 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:n
container-type: normal;
ct:s
container-type: size;

A container on its own does nothing visible. Its children respond to it with Container Queries.

Media Queries

Prefix a class with a breakpoint to apply it from that width up.