monks/container_type
An element can be established as a query container using the container-type CSS property. container-type is used to define the type of container context used in a container query. The available container contexts are:
- Size: Enable selectively applying CSS rules to a container’s children based on a general size or inline size condition such as a maximum or minimum dimension, aspect ratio, or orientation.
- Scroll-state: Enable selectively applying CSS rules to a container’s children based on a scroll-state condition such as whether the container is a scroll container that is partially scrolled or whether the container is a snap target that is going to be snapped to its scroll snap container.
Values
pub const inline_size: #(String, String)
- : Establishes a query container for dimensional queries on the inline axis of the container. Applies style and inline-size containment to the element. The inline size of the element can be computed in isolation, ignoring the child elements (see Using CSS containment).
pub const normal: #(String, String)
- : Default value. The element is not a query container for any container size queries, but remains a query container for container style queries.
pub const revert_layer: #(String, String)
pub const size: #(String, String)
- : Establishes a query container for container size queries in both the inline and block dimensions. Applies style and size containment to the element. Size containment is applied to the element in both the inline and block directions. The size of the element can be computed in isolation, ignoring the child elements.