[css-cascade] What is the appropriate syntax for appending to nested layers? · Issue #5791 · w3c/csswg-drafts (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
The draft Cascade 5 specification allows nesting cascade layers, and appending styles to nested layers using a dot (.
period/full-stop/U+002E
) character:
@layer framework { @layer default { p { margin-block: 0.75em; } }
@layer theme {
p { color: #222; }
}
}
/* These styles will be added to the theme layer inside the framework layer */ @layer framework.theme { blockquote { color: rebeccapurple; } }
It might also work to use a space, or some other character in place of the dot.