Skip to content

Commit 6c29b12

Browse files
committed
[css-typed-om] Replace cssText with stringifier.
(Addresses w3c#364)
1 parent 66347f9 commit 6c29b12

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

css-typed-om/Overview.bs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Some particular considerations:
107107

108108
<pre class='idl'>
109109
interface CSSStyleValue {
110-
readonly attribute DOMString cssText;
110+
stringifier;
111111
static CSSStyleValue? parse(DOMString property, DOMString cssText);
112112
static sequence&lt;CSSStyleValue>? parseAll(DOMString property, DOMString cssText);
113113
};
@@ -117,9 +117,8 @@ interface CSSStyleValue {
117117
Values that can't yet be directly supported by a {{CSSStyleValue}} subclass
118118
are also represented as {{CSSStyleValue}} objects.
119119

120-
The <dfn attribute for=CSSStyleValue>cssText</dfn> attribute,
121-
on getting,
122-
returns a normalized representation
120+
The <a for="CSSStyleValue">stringification behavior</a> of {{CSSStyleValue}} objects is to
121+
return a normalized representation
123122
(see [[#stylevalue-normalization]])
124123
of the value the {{CSSStyleValue}} object represents.
125124

@@ -1138,7 +1137,7 @@ is a [=list=] of {{CSSTransformComponent}}s.
11381137

11391138
<xmp class=idl>
11401139
interface CSSTransformComponent {
1141-
readonly attribute DOMString cssText;
1140+
stringifier;
11421141
attribute boolean is2D;
11431142
};
11441143

@@ -1595,8 +1594,8 @@ This section describes how Typed OM objects are constructed from CSS values.
15951594

15961595
If a property's grammar is more complex than one of the types listed here,
15971596
it produces a raw {{CSSStyleValue}},
1598-
with its {{CSSStyleValue/cssText}}
1599-
set to the CSSOM serialization of the property.
1597+
with a <a for=CSSStyleValue>stringification behavior</a>
1598+
that produces the CSSOM serialization of the property.
16001599

16011600
Issue: Better to define a full table of properties and what types they normalize to.
16021601

@@ -1961,14 +1960,14 @@ For example:
19611960

19621961
<pre class='lang-javascript'>
19631962
var length1 = CSSNumericValue.from("42.0px");
1964-
length1.cssText; // "42.0px"
1963+
length1.toString(); // "42.0px"
19651964

19661965
var length2 = CSSNumericValue.from(42.0, "px");
1967-
length2.cssText; // "42px";
1966+
length2.toString(); // "42px";
19681967

19691968
element.style.width = "42.0px";
19701969
var length3 = element.styleMap.get('width');
1971-
length3.cssText; // "42px";
1970+
length3.toString(); // "42px";
19721971
</pre>
19731972

19741973
</div>

0 commit comments

Comments
 (0)