Module jdk.xml.dom

Interface CSSPrimitiveValue

All Superinterfaces:
CSSValue

public interface CSSPrimitiveValue extends CSSValue
The CSSPrimitiveValue interface represents a single CSS value . This interface may be used to determine the value of a specific style property currently set in a block or to set a specific style property explicitly within the block. An instance of this interface might be obtained from the getPropertyCSSValue method of the CSSStyleDeclaration interface. A CSSPrimitiveValue object only occurs in a context of a CSS property.

Conversions are allowed between absolute values (from millimeters to centimeters, from degrees to radians, and so on) but not between relative values. (For example, a pixel value cannot be converted to a centimeter value.) Percentage values can't be converted since they are relative to the parent value (or another property value). There is one exception for color percentage values: since a color percentage value is relative to the range 0-255, a color percentage value can be converted to a number; (see also the RGBColor interface).

See also the Document Object Model (DOM) Level 2 Style Specification.

Since:
1.4, DOM Level 2