container-type
The CSS property that turns an element into a query container that its descendants can run container queries and container units against.
In more detail
container-type: inline-size allows queries on width, the inline dimension, without restricting height. container-name gives the container a name so nested components can target a specific ancestor rather than the nearest one.
Related terms
- container query — A CSS rule, written with @container, that styles a component based on the size of its container instead of the whole viewport.
- 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.
- logical properties — CSS sizes and directions described by writing direction, inline along a line of text and block across lines, instead of left, right, top and bottom.
Taught in
- Container Queries: Component-Driven Responsive Design — Frontend Architecture & Web Platform