concept
cascade-layer — CSS reference
A layer partitions rules within an origin and importance group. Normal declarations in later layers outrank earlier ones, and ordinary unlayered normal declarations outrank layered normal rules. Important order reverses, including unlayered important rules. Layer names organize priority rather than selector matching.
Formal Syntax & Structure
css syntaxcss
@layer base, components;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS reference lab</title><style>@layer base,app; @layer base {#a {color:#802020} #b {color:#006050!important}} @layer app {#b {color:#184168!important} .note {color:#184168}} #b {color:#802020!important}</style><body><p id="a" class="note">Field note</p><p id="b">Control</p></body></html>