Container query mixins that take a breakpoint name or a length.
.sidebar {
@includecontainer-type;
@includecontainer-name(sidebar);
}
.item {
@includecontainer-up(md, sidebar) {
font-size: 1.25rem;
}
}
Generated from the doc blocks in the core source when the site is built, so it always matches the current release of @wovenui/core. Every example is compiled against core during the build; open Compiled CSSunder an example to see its output. Guide: Container queries. The A to Z index lists every public mixin and function.
Applies styles only while the container is between the given breakpoint and the next larger one (minus 0.02px); the largest breakpoint has no upper limit.
Breakpoint name from $breakpoints (xs, sm, md, lg, xl, 2xl), a length such as 400px or 30rem, or calc(); any other word or a unitless number raises an error
$containerName
String|Null
null
Container name to query; null queries the nearest container
Content block
Styles to apply at and above the size
Example 1
.widget {
@includecontainer-query(400px, sidebar) {
display: grid;
}
}
Compiled CSS
@container sidebar (min-width: 400px) {
.widget {
display: grid;
}
}
Example 2
.widget-title {
@includecontainer-query(md) {
font-size: 1.25rem;
}
}
Compiled CSS
@container (min-width: 768px) {
.widget-title {
font-size: 1.25rem;
}
}
See also: container-up. Source: tools/_container-queries.scss:134
container-typemixin
Sets container-type so the element becomes a query container.