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/CSSStyleDeclaration/getPropertyPriority below:

CSSStyleDeclaration: getPropertyPriority() method - Web APIs

CSSStyleDeclaration: getPropertyPriority() method

Baseline Widely available

The CSSStyleDeclaration.getPropertyPriority() method interface returns a string that provides all explicitly set priorities on the CSS property.

Syntax
getPropertyPriority(property)
Parameters
property

A string representing the property name to be checked.

Return value

A string that represents the priority (e.g., "important") if one exists. If none exists, returns the empty string.

Examples

The following JavaScript code checks whether margin is marked as important in a CSS selector rule:

const declaration = document.styleSheets[0].cssRules[0].style;
const isImportant = declaration.getPropertyPriority("margin") === "important";
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