-
Notifications
You must be signed in to change notification settings - Fork 22.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(css): add layer() function page (#35508)
* fix(css): add layer() function page * Apply suggestions from code review
- Loading branch information
1 parent
eb7a000
commit 0febb03
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: layer() | ||
slug: Web/CSS/@import/layer_function | ||
page-type: css-function | ||
browser-compat: css.at-rules.import.layer | ||
--- | ||
|
||
{{CSSRef}} | ||
|
||
The **`layer()`** [CSS](/en-US/docs/Web/CSS) [function](/en-US/docs/Web/CSS/CSS_Functions) is used along with the [`@import`](/en-US/docs/Web/CSS/@import) [at-rule](/en-US/docs/Web/CSS/At-rule) to put the imported resource in a separate named [cascade layer](/en-US/docs/Web/CSS/@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 | ||
|
||
```plain | ||
layer() = layer( <layer-name> ) | ||
<layer-name> = | ||
<ident> [ '.' <ident> ]* | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{CSSxRef("@import")}} | ||
- [CSS cascade and inheritance](/en-US/docs/Web/CSS/CSS_cascade) module |