files/en-us/web/api/cssunitvalue/index.md
{{APIRef("CSS Typed Object Model API")}}
The CSSUnitValue interface of the CSS Typed Object Model API represents values that contain a single unit type. For example, "42px" would be represented by a CSSNumericValue.
{{InheritanceDiagram}}
CSSUnitValue object.The interface may also inherit methods from its parent interface, {{domxref("CSSNumericValue")}}.
The interface may also inherit methods from its parent interface, {{domxref("CSSNumericValue")}}.
The following shows a method of creating a {{domxref('CSSPositionValue')}} from individual CSSUnitValue constructors.
let pos = new CSSPositionValue(
new CSSUnitValue(5, "px"),
new CSSUnitValue(10, "px"),
);
{{Specifications}}
{{Compat}}