v130 · css
CSS Nesting: Stable Bare Declarations (CSSNestingDeclarations)
Keeps bare declarations following a nested rule in their place, by wrapping those declarations in CSSNestingDeclarations rules during parsing.
concepts
-
Bare Declarations (render order)
Edit a stylesheet with bare declarations after a nested rule. The card below repaints; the resolved background swatch shows that source order wins — gold beats white.
-
CSSOM mutate bare-decl blocks
Programmatically
insertRule/deleteRulebare-declaration blocks inside a parent rule at runtime. Watch the CSSOM tree update and the rendered card repaint — they are real, addressableCSSNestedDeclarationsrules. -
DevTools equivalence inspector
Edit nested CSS and toggle between three engines: pre-Chrome-130 (hoisted bare decls), Chrome 130 (CSSNestedDeclarations wrappers), and a DevTools-style flattened view. Each tab also re-renders the preview card so you can see which versions paint the design correctly.
-
Specificity Explorer
Choose a CSS nesting preset and analyse every bare declaration — shows which context each declaration belongs to (parent or
CSSNestedDeclarationsblock), which property wins, and a side-by-side before/after Chrome 130 preview. -
Component Cascade
Edit a nested stylesheet for a real button or card component in a live editor. A CSSOM rule tree and cascade resolution table update in real time, showing exactly which
CSSNestedDeclarationsblock each property comes from. -
Migration Guide
Step-by-step SASS/SCSS to native CSS nesting migration across five patterns: basic nesting, pseudo-classes, late overrides (the Chrome 130 fix), mixins to
@layer, and@mediainside rules.
why it shipped
Keeps bare declarations following a nested rule in their place, by wrapping those declarations in CSSNestingDeclarations rules during parsing.