-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
53 lines (38 loc) · 1.31 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: "CSSUnparsedValue: CSSUnparsedValue() constructor"
short-title: CSSUnparsedValue()
slug: Web/API/CSSUnparsedValue/CSSUnparsedValue
page-type: web-api-constructor
browser-compat: api.CSSUnparsedValue.CSSUnparsedValue
---
{{APIRef("CSS Typed OM")}}
The **`CSSUnparsedValue()`** constructor
creates a new {{domxref("CSSUnparsedValue")}} object which represents property values
that reference custom properties.
## Syntax
```js-nolint
new CSSUnparsedValue(members)
```
### Parameters
- `members`
- : An array whose values must be either a string or a
{{domxref('CSSVariableReferenceValue')}}.
## Examples
```js
const value = new CSSUnparsedValue(["4deg"]);
const values = new CSSUnparsedValue(["1em", "#445566", "-45px"]);
console.log(value); // CSSUnparsedValue {0: "4deg", length: 1}
console.log(values); // CSSUnparsedValue {0: "1em", 1: "#445566", 2: "-45px", length: 3}
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{domxref("CSSUnparsedValue.entries")}}
- {{domxref("CSSUnparsedValue.forEach")}}
- {{domxref("CSSUnparsedValue.keys")}}
- {{domxref("CSSUnparsedValue.length")}}
- {{domxref("CSSUnparsedValue.values")}}
- [Using the CSS Typed OM](/en-US/docs/Web/API/CSS_Typed_OM_API/Guide)
- [CSS Typed Object Model API](/en-US/docs/Web/API/CSS_Typed_OM_API)