MDN Web Docs

Interfaces

CSSStyleValue

The CSSStyleValue interface of the CSS Typed Object Model API is the base class of all CSS values accessible through the Typed OM API. An instance of this class may be used anywhere a string is expected.

CSSStyleValue.parse()

Method that allows CSSNumericValue to be constructed from a CSS string. It sets a specific CSS property to the specified values and returns the first value as a CSSStyleValue object.

CSSStyleValue.parseAll()

Method that sets all occurrences of a specific CSS property to the specified value and returns an array of CSSStyleValue objects, each containing one of the supplied values.

StylePropertyMap

The StylePropertyMap interface of the CSS Typed Object Model API provides a representation of a CSS declaration block that is an alternative to CSSStyleDeclaration.

StylePropertyMap.set()

Method that changes the CSS declaration with the given property to the value given.

StylePropertyMap.append()

Method that adds a new CSS declaration to the StylePropertyMap with the given property and value.

StylePropertyMap.delete()

Method that removes the CSS declaration with the given property from the StylePropertyMap.

StylePropertyMap.clear()

Method that removes all declarations in the StylePropertyMap.

CSSUnparsedValue

The CSSUnparsedValue interface of the CSS Typed Object Model API represents property values that reference custom properties. It consists of a list of string fragments and variable references.

CSSUnparsedValue() constructor

Creates a new CSSUnparsedValue object which represents property values that reference custom properties.

CSSUnparsedValue.entries()

Method returning an array of a given object's own enumerable property [key, value] pairs in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).

CSSUnparsedValue.forEach()

Method executing a provided function once for each element of the CSSUnparsedValue.

CSSUnparsedValue.keys()

Method returning a new array iterator object that contains the keys for each index in the array.

CSSKeywordValue Serialization

The CSSKeywordValue interface of the CSS Typed Object Model API creates an object to represent CSS keywords and other identifiers.

CSSKeywordValue() constructor

Constructor creates a new CSSKeywordValue() object which represents CSS keywords and other identifiers.

CSSKeywordValue.value()

Property of the CSSKeywordValue interface returning or setting the value of the CSSKeywordValue.

CSSStyleValue Interfaces

CSSStyleValue is the base class through which all CSS values are expressed. Subclasses include:

CSSImageValue

An interface representing values for properties that take an image, for example background-image, list-style-image, or border-image-source.

CSSKeywordValue

An interface which creates an object to represent CSS keywords and other identifiers. When used where a string is expected, it will return the value of CSSKeyword.value.

CSSMathValue

A tree of subclasses representing numeric values that are more complicated than a single value and unit, including:

CSSNumericValue

An interface representing operations that all numeric values can perform, including:

CSSPositionValue

Represents values for properties that take a position, for example object-position.

CSSTransformValue

An interface representing a list of transform list values. They "contain" one or more CSSTransformComponents, which represent individual transform function values.

CSSUnitValue

An interface representing numeric values that can be represented as a single unit, or a named number and percentage.

CSSUnparsedValue

Represents property values that reference custom properties. It consists of a list of string fragments and variable references.

Specifications

Specification
CSS Typed OM Level 1
# stylevalue-objects
CSS Typed OM Level 1
# the-stylepropertymap
CSS Typed OM Level 1
# cssunparsedvalue
CSS Typed OM Level 1
# keywordvalue-objects

Browser compatibility

api.CSSStyleValue

api.StylePropertyMap

api.CSSUnparsedValue

api.CSSKeywordValue

See also

Help improve MDN

Yes No

Learn how to contribute

This page was last modified on by MDN contributors.

Read the original on developer.mozilla.org ↗