@@ -39,25 +39,24 @@ Issue: is it possible to amalgamate this API with value objects once they're spe
39
39
============================================
40
40
41
41
<pre class='idl'>
42
- enum StyleValueKeyword {"initial", "inherit", "default ", "unset"};
42
+ enum StyleValueKeyword {"initial", "inherit", "revert ", "unset"};
43
43
44
44
interface StyleValue {
45
- attribute StyleValueKeyword? keywordValue;
46
45
attribute DOMString cssString;
47
46
static (StyleValue or sequence<StyleValue>)? parse(DOMString property, DOMString cssText);
48
47
};
48
+
49
+ [Constructor(StyleValueKeyword)]
50
+ interface KeywordValue : StyleValue {
51
+ attribute StyleValueKeyword keywordValue;
52
+ };
49
53
</pre>
50
54
51
55
{{StyleValue}} objects are the base class of all CSS Values accessible via the Typed OM API.
52
56
53
- For a given {{StyleValue}} :
54
- : The <dfn attribute for=StyleValue>keywordValue</dfn> attribute
55
- :: is either set to one of the universal keywords represented in the
56
- {{StyleValueKeyword}} enum, or null if the object has a more specific
57
- value.
58
- : The <dfn attribute for=StyleValue>cssString</dfn> attribute
59
- :: provides a normalized representation (see <a section href="#stylevalue-normalization"></a> )
60
- of the value.
57
+ The <dfn attribute for=StyleValue>cssString</dfn> attribute provides a normalized
58
+ representation (see <a section href="#stylevalue-normalization"></a> ) of the value
59
+ contained by a {{StyleValue}} object.
61
60
62
61
The <dfn method for=StyleValue>parse(DOMString <var>property</var>, DOMString <var>cssText</var>)</dfn>
63
62
method attempts to parse <var> cssText</var> as a valid {{StyleValue}} or sequence<{{StyleValue> for
@@ -66,6 +65,9 @@ method attempts to parse <var>cssText</var> as a valid {{StyleValue}} or sequenc
66
65
Issue(41): Need to add a section describing values that reference custom properties. Should StyleValue handle
67
66
this or should it be a subclass?
68
67
68
+ {{KeywordValue}} objects represent {{StyleValue}} s that are set to one of the
69
+ <a>CSS-wide keywords</a> or to ''revert'' .
70
+
69
71
The {{StylePropertyMap}} {#the-stylepropertymap}
70
72
================================================
71
73
@@ -111,7 +113,7 @@ When invoked, the <dfn method for=StylePropertyMap>append(DOMString <var>propert
111
113
112
114
Issue: first need to check whether the property is a valid property.
113
115
114
- 1.
116
+ 1.
115
117
: if <var> property</var> is not list-valued
116
118
:: throw a TypeError
117
119
@@ -483,7 +485,7 @@ interface PositionValue : StyleValue {
483
485
484
486
</pre>
485
487
486
- {{PositionValue}} objects represent values for properties that take <<position>>
488
+ {{PositionValue}} objects represent values for properties that take <<position>>
487
489
productions, for example 'background-position' .
488
490
489
491
The <dfn attribute for=PositionValue>x</dfn> attribute contains the position offset
@@ -500,7 +502,7 @@ for=PositionValue>x</a> and <a attribute for=PositionValue>y</a> values of the
500
502
{{StyleValue}} object.
501
503
502
504
New {{PositionValue}} objects can only be constructed via pairs of lengths, and
503
- will only return the direct serialization of these lengths in the
505
+ will only return the direct serialization of these lengths in the
504
506
<a attribute for=StyleValue>cssString</a> attribute.
505
507
506
508
<div class='example'>
0 commit comments