Yes, developers use nested CSS, and it has become a normal part of modern front-end work. The key qualification is which kind of nesting: developers have nested selectors through Sass and other preprocessors for well over a decade, and native CSS nesting — written directly in a .css file with no build step — is now supported across all major browsers. So the accurate answer is that nesting is widely used, both through preprocessors and natively, but it is used selectively rather than as a default style for every rule. Understanding that distinction explains most of the confusion around the question.
Two Kinds of Nesting That People Mean
The search phrase "nested CSS" can refer to two related but different things, and they produce different answers about developer usage.
Preprocessor nesting means writing nested rules in a language like Sass, Less, or Stylus, which compiles down to flat CSS. This has been standard practice in professional front-end codebases since roughly the early 2010s. A Sass file might nest a button's hover state and an inner icon selector inside the button rule, and the compiler flattens it into separate selectors.
Native CSS nesting is the CSS Nesting module built into the language itself. You can write nested rules in a plain stylesheet, and browsers resolve them directly. This shipped progressively across major browsers in 2023 and is now considered broadly available. When someone asks today whether developers "use nested CSS," they are often really asking whether native nesting is safe to use in production — and the answer is yes, with the caveats described below.
Why Developers Adopt Nesting
The appeal is structural. CSS selectors can get repetitive, and nesting lets a developer express hierarchy once instead of repeating a parent selector on every line. A card component with a header, body, and footer reads more clearly when those parts are nested under the card selector than when each is a separate top-level rule.
Nesting also improves locality of reasoning. When all styles for a component live under one parent rule, a developer changing that component can see related rules together rather than hunting through a file. This matters most in large codebases and component-based frameworks, where styles are often scoped conceptually to a single component.
There is a workflow benefit too. Developers who already write Sass or Less did not have to change their mental model to adopt native nesting; the syntax is similar. That continuity made the transition easier and helped native nesting gain traction quickly.
Why Developers Are Cautious With It
Nesting is popular but not unlimited. Experienced developers generally avoid deep nesting, and for good reasons.
Deep nesting produces long, specific selectors. A rule nested four or five levels deep compiles to something like .page .section .card .header .title, which is hard to override later and couples the component tightly to its page context. That coupling is exactly what component-based styling tries to avoid. Many style guides and linters cap nesting depth — commonly at two or three levels — for this reason.
Nesting also interacts with specificity in ways that surprise people. Native CSS nesting uses the & parent selector and, importantly, changed the specificity rules from the early preprocessor conventions: the specificity of the nested rule includes the specificity of the parent selector. A developer who assumes nesting is "free" and does not think about specificity can end up with styles that are harder to override than expected.
Finally, nesting can hide selector relationships. A flat list of rules makes the full selector visible at a glance; nesting requires the reader to trace the parent chain. For small components this is a benefit, but for sprawling stylesheets it can become a readability cost.
How Native Nesting Differs From Sass
The syntax looks similar, but the semantics are not identical, and that trips up developers moving from Sass to native CSS.
In Sass, the parent selector & is required for certain combinations and optional in others, and nesting is essentially textual expansion. In native CSS, nesting works with or without & for descendant selectors, but & is required when you need the parent selector in a compound position — for example, .button { &:hover { ... } } or .card { &.featured { ... } }.
Native CSS nesting also handles declarations after nested rules differently. In Sass, declarations are hoisted and the output order can shift; cascade layers and the CSSOM treat native nesting with stricter ordering rules. A developer who writes a declaration after a nested rule in native CSS may get different cascade behavior than the same code in Sass. The practical lesson is that native nesting is not a drop-in replacement for a preprocessor, and teams migrating should test cascade-sensitive styles.
Where You'll See Nesting in Practice
Nesting appears most often in component-oriented styling: buttons with hover and focus states, cards with internal layout rules, form fields with validation states, and navigation items with active modifiers. It also shows up heavily in CSS-in-JS and utility-adjacent workflows, though those tools often generate flat selectors behind the scenes.
It is less common in large design-system stylesheets that intentionally keep selectors shallow and composable, and in legacy codebases where a preprocessor was never adopted. It is also rare in reset or base stylesheets, where flat, minimal selectors are the norm.
| Context | Typical nesting use |
|---|---|
| Component styles (buttons, cards, forms) | Common, usually shallow |
| Preprocessor codebases (Sass/Less) | Long-standing, often deeper |
| Design systems and base styles | Deliberately minimal |
| Frameworks with scoped styles | Common, scoped to component |
| Legacy plain-CSS projects | Limited, being adopted gradually |
Browser Support and Production Readiness
Native CSS nesting is supported in current versions of Chrome, Edge, Firefox, and Safari, and it has been stable in those browsers long enough to be considered production-ready for most projects. The practical caveat is which baseline your project targets. Teams supporting older browser versions — or environments pinned to older embedded browsers — may still need a preprocessor or a build step to flatten nesting for compatibility.
Developers also use build tools to transform native nesting for older targets, so the source can be written with nesting while the output remains flat. That hybrid approach is common: write modern nested CSS, let the pipeline handle compatibility. It means the answer to "do developers use nested CSS" can be yes even in projects that ship flat CSS to browsers.
Common Misconceptions
A few recurring misunderstandings are worth clearing up.
"Nesting is a preprocessor feature only." This was true before native CSS nesting existed and is no longer accurate. Native nesting is part of the language and widely supported.
"Nesting makes CSS more specific, so it's always riskier." Nesting does increase specificity relative to the flat equivalent, but the risk comes from depth, not nesting itself. A single nested level rarely causes problems; five levels usually do.
"You should never nest." This overcorrection appears in some style guides, but it conflates "avoid deep nesting" with "avoid nesting." The common professional guidance is to nest shallowly and intentionally, not to forbid it.
"Native nesting works exactly like Sass." It is close enough to be familiar and different enough to cause bugs, especially around the & selector and declaration ordering.
How Teams Decide
Whether a given developer uses nested CSS depends less on capability than on convention. Many teams standardize on component-scoped styles and allow nesting within a component but not across components. Others enforce a maximum nesting depth with a linter rule such as Stylelint's max-nesting-depth. Still others rely on preprocessors for legacy reasons and have not migrated.
The honest summary is that nesting is a tool developers reach for when it improves locality and readability, and avoid when it would produce brittle, over-specific selectors. That judgment call, more than browser support, drives day-to-day usage.
The Short Answer, Restated
Developers use nested CSS regularly, both through preprocessors and natively in modern browsers. Native nesting is production-ready for current browser targets, and teams that need older compatibility can write nested source and flatten it in the build. The practical guidance that has emerged is straightforward: nest shallowly, understand how specificity accumulates, and do not assume native nesting behaves identically to Sass. Used that way, nesting is a normal and useful part of modern CSS rather than an experimental technique.