CodeZettaInterview Hub

SCSS · Nesting · Junior · Best Practice

Why is deep nesting considered harmful?

Short Interview Answer

High specificity, brittle coupling to DOM depth, larger selectors, and harder overrides.

Detailed Explanation

Limit to 2–3 levels. Prefer BEM/flat utility compositions. Nesting is not permission to mirror entire DOM.

Common Mistake

Nesting five levels deep because the HTML is five levels deep.

Did you know this answer?