A RetroSearch Logo

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

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/CSSPropertyRule/initialValue below:

CSSPropertyRule: initialValue property - Web APIs

CSSPropertyRule: initialValue property

Baseline 2024

Newly available

The read-only initialValue nullable property of the CSSPropertyRule interface returns the initial value of the custom property registration represented by the @property rule, controlling the property's initial value.

Value

A string which is a <declaration-value>.

Examples

This stylesheet contains a single @property rule. The first CSSRule returned will be a CSSPropertyRule representing this rule. The initialValue property returns the string "#c0ffee" this being the value of the initial-value property in the CSS.

@property --property-name {
  syntax: "<color>";
  inherits: false;
  initial-value: #c0ffee;
}
const myRules = document.styleSheets[0].cssRules;
console.log(myRules[0].initialValue); // "#c0ffee"
Specifications Browser compatibility

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