layer()
The layer()
CSS function is used along with the @import
at-rule to put the imported resource in a separate named cascade layer.
Syntax
css
@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> ) <layer-name> = <ident> [ '.' <ident> ]*
Specifications
Specification |
---|
CSS Cascading and Inheritance Level 5 # ref-for-typedef-layer-name |
Browser compatibility
BCD tables only load in the browser