Skip to content

Commit 029c4dc

Browse files
committed
add thoughts on ident/string
1 parent 9e1cda6 commit 029c4dc

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

cssom/Overview.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3901,9 +3901,18 @@ <h4 id=the-csscomponentvalue-interface><span class=secno>5.6.6. </span>The
39013901

39023902
<pre
39033903
class=idl>[NoInterfaceObject] interface <dfn id=csscomponentvalue>CSSComponentValue</dfn> {
3904+
readonly attribute DOMString <span title=dom-CSSComponentValue-type>type</span>;
3905+
attribute any <span title=dom-CSSComponentValue-value>value</span>;
39043906
};</pre>
39053907

3906-
<p class=XXX>Components need to identify their current value somehow.
3908+
<p class=XXX>type returns "string", "ident", "color", "em", "ex", "px",
3909+
"url".
3910+
3911+
<p class=note>&lt;string> and &lt;ident> component values do not have their
3912+
own interface. They are identified by the <span
3913+
title=dom-CSSComponentValue-type>type</span> attribute and the <span
3914+
title=dom-CSSComponentValue-value>value</span> attribute returns a
3915+
DOMString representing either one of them.
39073916

39083917
<h4 id=the-csscolorcomponentvalue-interface><span class=secno>5.6.7.
39093918
</span>The <code title="">CSSColorComponentValue</code> Interface</h4>

cssom/Overview.src.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,10 +2459,17 @@ <h4>The <code title="">CSSPropertyValueList</code> Interface</h4>
24592459
<h4>The <code title="">CSSComponentValue</code> Interface</h4>
24602460

24612461
<pre class="idl">[NoInterfaceObject] interface <dfn>CSSComponentValue</dfn> {
2462+
readonly attribute DOMString <span title="dom-CSSComponentValue-type">type</span>;
2463+
attribute any <span title="dom-CSSComponentValue-value">value</span>;
24622464
};</pre>
24632465

2464-
<p class="XXX">Components need to identify their current value
2465-
somehow.</p>
2466+
<p class="XXX">type returns "string", "ident", "color", "em", "ex", "px", "url".</p>
2467+
2468+
<p class="note">&lt;string> and &lt;ident> component values do not have
2469+
their own interface. They are identified by the
2470+
<span title="dom-CSSComponentValue-type">type</span> attribute and the
2471+
<span title="dom-CSSComponentValue-value">value</span> attribute returns a
2472+
DOMString representing either one of them.</p>
24662473

24672474

24682475
<h4>The <code title="">CSSColorComponentValue</code> Interface</h4>

0 commit comments

Comments
 (0)