CSS @layer Rule

❮ Previous Reference Next ❯


p {
  color: rebeccapurple;

@layer type {
  .box p {
    font-weight: bold;
    font-size: 1.3em;
    color: green;


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


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.
❮ Previous Reference Next ❯