CSSStyleDeclarationBase

The CSSStyleDeclaration interface represents an object that is a CSS declaration block, and exposes style information and various style-related methods and properties.

MDN Reference

Inheritors

Properties

Link copied to clipboard
open var cssText: String

The cssText property of the CSSStyleDeclaration interface returns or sets the text of the element's inline style declaration only.

Link copied to clipboard
open override val length: Int

The read-only property returns an integer that represents the number of style declarations in this CSS declaration block.

Link copied to clipboard
open val parentRule: CSSRule?

The CSSStyleDeclaration.parentRule read-only property returns a CSSRule that is the parent of this style block, e.g., a CSSStyleRule representing the style for a CSS selector.

Functions

Link copied to clipboard
open operator fun get(index: Int): JsString
Link copied to clipboard
open fun getPropertyPriority(property: String): String

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

Link copied to clipboard
open fun getPropertyValue(property: String): String

The CSSStyleDeclaration.getPropertyValue() method interface returns a string containing the value of a specified CSS property.

Link copied to clipboard
open fun item(index: Int): String

The CSSStyleDeclaration.item() method interface returns a CSS property name from a CSSStyleDeclaration by index.

Link copied to clipboard
open fun removeProperty(property: String): String

The CSSStyleDeclaration.removeProperty() method interface removes a property from a CSS style declaration object.

Link copied to clipboard
open fun setProperty(property: String, value: String?, priority: String = definedExternally)

The CSSStyleDeclaration.setProperty() method interface sets a new value for a property on a CSS style declaration object.