A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/CSSLayerBlockRule below:

CSSLayerBlockRule - Web APIs | MDN

CSSLayerBlockRule

Baseline Widely available

The CSSLayerBlockRule represents a @layer block rule.

CSSRule CSSGroupingRule CSSLayerBlockRule Instance properties

Inherits properties from its ancestors CSSGroupingRule and CSSRule.

CSSLayerBlockRule.name Read only

A string containing the name of the associated cascade layer.

Instance methods

Inherits methods from its ancestors CSSGroupingRule and CSSRule.

Examples HTML
<p>I am displayed in <code>color: rebeccapurple</code>.</p>
CSS
@layer special {
  p {
    color: rebeccapurple;
  }
}
JavaScript
const item = document.getElementsByTagName("p")[0];
const rules = document.styleSheets[1].cssRules;
// Note that stylesheet #1 is the stylesheet associated with this embedded example,
// while stylesheet #0 is the stylesheet associated with the whole MDN page

const layer = rules[0]; // A CSSLayerBlockRule

item.textContent = `The CSSLayerBlockRule is for the "${layer.name}" layer`;
Result Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4