Firefox Tomorrow

css function

`layer()` CSS function

View on MDN ↗

The layer() CSS function is used along with the @import at-rule to put the imported resource in a separate named cascade layer.

Syntax

@import url layer(layer-name);
@import "dark.css" layer(framework.themes.dark);

The framework.themes.dark is the layer into which the CSS file would be imported.

Formal syntax

layer() = layer( <layer-name> )

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also