Skip to content

Commit 24cc580

Browse files
committed
[css-typed-om] Fix CSSUnparsedValue to be valid.
Addresses (but doesn't close) w3c#239
1 parent ecd7c4f commit 24cc580

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

css-typed-om/Overview.bs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,11 @@ The value for a given property is the last valid value provided in the string.
367367
----------------------------------------------
368368

369369
<pre class='idl'>
370+
[Constructor((DOMString or CSSVariableReferenceValue)... members)]
370371
interface CSSUnparsedValue : CSSStyleValue {
371372
iterable<(DOMString or CSSVariableReferenceValue)>;
373+
readonly attribute unsigned long length;
374+
getter (DOMString or CSSVariableReferenceValue) (unsigned long index);
372375
};
373376

374377
interface CSSVariableReferenceValue {
@@ -377,13 +380,18 @@ interface CSSVariableReferenceValue {
377380
};
378381
</pre>
379382

383+
Issue(239): Is this the best representation for this object?
384+
380385
{{CSSUnparsedValue}} objects represent values that reference custom properties.
381386
They represent a list of string fragments and variable references.
382387

383388
They have a <dfn attribute for=CSSUnparsedValue>\[[tokens]]</dfn> internal slot,
384389
which is a [=list=] of alternating {{DOMString}} and {{CSSVariableReferenceValue}} objects.
385390
This list is the object's [=values to iterate over=].
386391

392+
The <dfn attribute for=CSSUnparsedValue>length</dfn> attribute indicates how many string fragments and variable references are contained within the {{UnparsedValue}}.
393+
394+
The <dfn for=CSSUnparsedValue>indexed getter</dfn> retrieves the string fragment or variable reference at the provided index.
387395

388396
<!--
389397
██ ██ ████████ ██ ██ ██ ██ ███████ ████████ ████████

0 commit comments

Comments
 (0)