Container queries (size)Baseline · Widely available
Container size queries with the @container (…) at-rule apply styles to an element based on a dimension of its container, such as width or height.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Feb 14, 2023. Widely available since Aug 14, 2025.
Browser support
DesktopChrome
1–104Not supported
105+Supportedsince Sep 2, 2022
Current: 155Edge
12–104Not supported
105+Supportedsince Sep 1, 2022
Current: 154Firefox
1–109Not supported
110+Supportedsince Feb 14, 2023
Current: 157Safari
1–15.6Not supported
16+Supportedsince Sep 12, 2022
Current: 27MobileChrome Android
18–104Not supported
105+Supportedsince Sep 2, 2022
Current: 155Firefox Android
4–109Not supported
110+Supportedsince Feb 14, 2023
Current: 157Safari iOS
1–15.6Not supported
16+Supportedsince Sep 12, 2022
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
CSS
.card-list {
container-type: inline-size;
container-name: cards;
}
/* Lay the card out horizontally once its container is wide enough */
@container cards (min-width: 400px) {
.card {
display: grid;
grid-template-columns: 120px 1fr;
}
}Feature detection
CSS · check before using
@supports (container: initial) {
/* styles that rely on container */
}
/* or in JavaScript */
if (CSS.supports("container", "initial")) {
// use it
}Sub-features
Support for each part of the feature (12). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| CSSContainerRule | 105 | 105 | 110 | 16 | 105 | 110 | 16 |
| CSSContainerRule.containerName | 111 | 111 | 110 | 17 | 111 | 110 | 17 |
| CSSContainerRule.containerQuery | 111 | 111 | 110 | 17 | 111 | 110 | 17 |
| @container | 105 | 105 | 110 | 16 | 105 | 110 | 16 |
| container | 105 | 105 | 110 | 16 | 105 | 110 | 16 |
| container-name | 105 | 105 | 110 | 16 | 105 | 110 | 16 |
| container-name.none | 105 | 105 | 110 | 16 | 105 | 110 | 16 |
| container-type | 105 | 105 | 110 | 16 | 105 | 110 | 16 |
| container-type.inline-size | 105 | 105 | 110 | 16 | 105 | 110 | 16 |
| container-type.normal | 105 | 105 | 110 | 16 | 105 | 110 | 16 |
| container-type.size | 105 | 105 | 110 | 16 | 105 | 110 | 16 |
| <length>.container_query_length_units | 105 | 105 | 110 | 16 | 105 | 110 | 16 |