container query units

CSS length units measured against the query container: 1cqi is one percent of its inline size, 1cqw of its width, 1cqh of its height.

In more detail

cqmin and cqmax use the smaller or larger of the two dimensions. They let typography and spacing scale with the component's own box instead of the viewport, so a card in a 320px sidebar gets proportionally smaller padding.

Related terms

Taught in

References