IT lexicon › Web › CSS nesting

CSS nesting

Web På svenska → Updated: 2026-05-24

Native CSS nesting — write rules inside others, like in Sass: .card { & h2 { color: red; } }.

Supported in all modern browsers since 2023. Eliminates a big reason to use Sass. Be careful: deep nesting = hard-to-read CSS. Max 2-3 levels is good practice.

← Back to the lexicon