Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. CSS
  3. Reference
  4. At-rules
  5. @import
  6. layer()

layer()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨March 2022⁩.

Thelayer()CSSfunction is used along with the@importat-rule to put the imported resource in a separate namedcascade layer.

Syntax

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

Theframework.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

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp