CSS @layer Rule
Example
p {
color: rebeccapurple;
}
@layer type {
.box p {
font-weight: bold;
font-size: 1.3em;
color: green;
}
}
Meaning:
The @layer CSS at-rule is used to declare a cascade layer and can also be used to define the order of precedence in case of multiple cascade layers.
Standard Syntax
@layer layerName {rules}
Browser Support
Status
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
layerName | Is the name of the cascade layer. |
rules | Is the set of CSS rules in the cascade layer. |