NestingBaseline · Widely available
CSS nesting allows for shorter selectors, easier reading, and more modularity by nesting rules inside others.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Dec 11, 2023. Widely available since Jun 11, 2026.
Browser support
DesktopChrome
1–119Not supported
120+Supportedsince Dec 5, 2023
Current: 155Edge
12–119Not supported
120+Supportedsince Dec 7, 2023
Current: 154Firefox
1–116Not supported
117+Supportedsince Aug 29, 2023
Current: 157Safari
1–17.1Not supported
17.2+Supportedsince Dec 11, 2023
Current: 27MobileChrome Android
18–119Not supported
120+Supportedsince Dec 5, 2023
Current: 155Firefox Android
4–116Not supported
117+Supportedsince Aug 29, 2023
Current: 157Safari iOS
1–17.1Not supported
17.2+Supportedsince Dec 11, 2023
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
CSS
.card {
padding: 1rem;
& h2 { margin: 0; }
&:hover { box-shadow: 0 2px 8px rgb(0 0 0 / 0.2); }
@media (width > 600px) {
padding: 2rem;
}
}Feature detection
CSS · check before using
@supports selector(&) {
/* nested rules are understood here */
}
/* or in JavaScript */
if (CSS.supports("selector(&)")) {
// CSS nesting is supported
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (6). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| CSSNestedDeclarations | 130 | 130 | 132 | 18.2 | 130 | 132 | 18.2 |
| CSSNestedDeclarations.style | 130 | 130 | 132 | 18.2 | 130 | 132 | 18.2 |
| CSSStyleRule.cssRules | 112 | 112 | 117 | 16.5 | 112 | 117 | 16.5 |
| CSSStyleRule.deleteRule | 112 | 112 | 117 | 16.5 | 112 | 117 | 16.5 |
| CSSStyleRule.insertRule | 112 | 112 | 117 | 16.5 | 112 | 117 | 16.5 |
| nesting | 120 | 120 | 117 | 17.2 | 120 | 117 | 17.2 |