CSS Nesting (&)
Widely availableSince 202394% of users
Allows you to write CSS rules inside of other rules. This makes your code more organized and mirrors the structure of your HTML.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since December 2023. Widely available since June 2026.
The old way and the modern waySee the snippet: Nesting selectors without Sass or Less →
Old way 8 lines
// nav.scss, requires Sass compiler
.nav {
display: flex;
gap: 8px;
& a {
color: blue;
}
}Modern 12 lines
/* nav.css, plain CSS, no compiler */
.nav {
display: flex;
gap: 8px;
& a {
color: #888;
text-decoration: none;
&:hover {
color: white;
}
}
}Newer parts of CSS Nesting (&)
& treated as :where(:scope) in @scope blocksBaseline Dec 2025
See how modern your own CSS is.Check your CSS →
Quick example
.card {
padding: 1rem;
/* Native CSS nesting! */
h2 {
color: blue;
}
&:hover {
background: #f0f0f0;
}
}Related snippet
Nesting selectors without Sass or LessWorkflow →CSS Nesting (&) browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2023.Safe to use without fallbacks.
Usage94%of people can use this6% use a browser without it.
Browsers
120+
117+
17.2+
120+Mobile
120+Android
117+Android
17.2+iOS