Skip to content

Commit 147461b

Browse files
Daniel Glazmanzcorpan
authored andcommitted
[cssom] Editorial: escaped → serialization
PR: #98
1 parent 0e0ba69 commit 147461b

File tree

1 file changed

+32
-31
lines changed

1 file changed

+32
-31
lines changed

cssom/Overview.bs

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ are always serialized with '"' (U+0022).
229229

230230
To <dfn export>serialize a URL</dfn> means to create a string represented by
231231
"<code>url(</code>", followed by the
232-
<a lt="serialize a string">string escaped</a> value of the given
232+
<a lt="serialize a string">serialization</a> of the URL as a
233233
string, followed by "<code>)</code>".
234234

235235
To <dfn export>serialize a comma-separated list</dfn> concatenate all items of
@@ -301,8 +301,8 @@ finally return <var>s</var>:
301301
<li>If the media query is negated append "<code>not</code>", followed
302302
by a single SPACE (U+0020), to <var>s</var>.
303303

304-
<li>Let <var>type</var> be the media type of the media query,
305-
<a lt="serialize an identifier">escaped</a> and
304+
<li>Let <var>type</var> be the <a lt="serialize an identifier">serialization
305+
as an identifier</a> of the media type of the media query,
306306
<a>converted to ASCII lowercase</a>.
307307

308308
<li>If the media query does not contain media features append
@@ -526,8 +526,8 @@ To
526526
<dfn export>serialize a group of selectors</dfn>
527527
<a lt="serialize a selector">serialize</a> each selector in the
528528
group of selectors and then
529-
<a lt="serialize a comma-separated list">serialize</a> the
530-
group.
529+
<a lt="serialize a comma-separated list">serialize</a> a
530+
comma-separated list of these serializations.
531531

532532
To <dfn export>serialize a selector</dfn> let
533533
<var>s</var> be the empty string, run the steps below for each
@@ -579,18 +579,18 @@ finally return <var>s</var>:
579579
<li>If the <a>namespace prefix</a> maps to a namespace that is
580580
not the <a>default namespace</a> and is not the
581581
null namespace (not in a namespace) append the
582-
<a lt="serialize an identifier">escaped</a>
583-
<a>namespace prefix</a>, followed by a "<code>|</code>" (U+007C)
584-
to <var>s</var>.
582+
<a lt="serialize an identifier">serialization</a> of the
583+
<a>namespace prefix</a> as an identifier, followed by a
584+
"<code>|</code>" (U+007C) to <var>s</var>.
585585

586586
<li>If the <a>namespace prefix</a> maps to a namespace that is
587587
the null namespace (not in a namespace) append
588588
"<code>|</code>" (U+007C) to <var>s</var>.
589589
<!-- This includes |* -->
590590

591591
<li>If this is a type selector append the
592-
<a lt="serialize an identifier">escaped</a> element name to
593-
<var>s</var>.
592+
<a lt="serialize an identifier">serialization</a> of the element name
593+
as an identifier to <var>s</var>.
594594

595595
<li>If this is a universal selector append "<code>*</code>" (U+002A)
596596
to <var>s</var>.
@@ -605,12 +605,12 @@ finally return <var>s</var>:
605605

606606
<li>If the <a>namespace prefix</a> maps to a namespace that is
607607
not the null namespace (not in a namespace) append the
608-
<a lt="serialize an identifier">escaped</a>
609-
<a>namespace prefix</a>, followed by a "<code>|</code>" (U+007C)
610-
to <var>s</var>.
608+
<a lt="serialize an identifier">serialization</a> of the
609+
<a>namespace prefix</a> as an identifier, followed by a
610+
"<code>|</code>" (U+007C) to <var>s</var>.
611611

612-
<li>Append the <a lt="serialize an identifier">escaped</a>
613-
attribute name to <var>s</var>.
612+
<li>Append the <a lt="serialize an identifier">serialization</a>
613+
of the attribute name as an identifier to <var>s</var>.
614614

615615
<li>If there is an attribute value specified, append
616616
"<code>=</code>",
@@ -620,8 +620,8 @@ finally return <var>s</var>:
620620
"<code>$=</code>", or
621621
"<code>*=</code>"
622622
as appropriate (depending on the type of attribute selector), followed
623-
by the <a lt="serialize a string">string escaped</a>
624-
attribute value, to <var>s</var>.
623+
by the <a lt="serialize a string">serialization</a> of the
624+
attribute value as a string, to <var>s</var>.
625625

626626
<li>If the attribute selector has the case-sensitivity flag present,
627627
append "<code> i</code>" (U+0020 U+0069) to <var>s</var>.
@@ -633,13 +633,13 @@ finally return <var>s</var>:
633633

634634
<dt>class selector
635635
<dd>Append a "<code>.</code>" (U+002E), followed by the
636-
<a lt="serialize an identifier">escaped</a> class name to
637-
<var>s</var>.
636+
<a lt="serialize an identifier">serialization</a> of the class name
637+
as an identifier to <var>s</var>.
638638

639639
<dt>ID selector
640640
<dd>Append a "<code>#</code>" (U+0023), followed by the
641-
<a lt="serialize an identifier">escaped</a> ID to
642-
<var>s</var>.
641+
<a lt="serialize an identifier">serialization</a> of the ID
642+
as an identifier to <var>s</var>.
643643

644644
<dt>pseudo-class
645645
<dd>
@@ -654,9 +654,10 @@ finally return <var>s</var>:
654654

655655
<dl class="switch">
656656
<dt><code>:lang()</code>
657-
<dd>The value of each argument <a lt="serialize a string">string escaped</a>,
658-
preserving relative order,
659-
separated by "<code>, </code>" (U+002C U+0020).
657+
<dd>The <a lt="serialize a comma-separated list">serialization of a
658+
comma-separated list</a> of each argument's
659+
<a lt="serialize a string">serialization as a string</a>, preserving
660+
relative order.
660661

661662
<dt><code>:nth-child()</code>
662663
<dt><code>:nth-last-child()</code>
@@ -1458,11 +1459,11 @@ To <dfn>serialize a CSS rule</dfn>, perform one of the following in accordance w
14581459

14591460
<dt>{{CSSNamespaceRule}}
14601461
<dd>The literal string "<code>@namespace</code>", followed by a single SPACE
1461-
(U+0020), followed by the
1462-
<a lt="serialize an identifier">identifier escaped</a> value of the
1462+
(U+0020), followed by the
1463+
<a lt="serialize an identifier">serialization as an identifier</a> of the
14631464
{{CSSNamespaceRule/prefix}} attribute (if
14641465
any), followed by a single SPACE (U+0020) if there is a prefix, followed by the
1465-
<a lt="serialize a URL">URL escaped</a> value of the
1466+
<a lt="serialize a URL">serialization as URL</a> of the
14661467
{{CSSNamespaceRule/namespaceURI}}
14671468
attribute, followed the character "<code>;</code>" (U+003B).
14681469
</dl>
@@ -2400,7 +2401,7 @@ depends on the component, as follows:
24002401

24012402
<dt>&lt;identifier>
24022403
<dd>The identifier
2403-
<a lt="serialize an identifier">escaped</a>.
2404+
<a lt="serialize an identifier">serialized as an identifier</a>.
24042405

24052406
<dt>&lt;integer>
24062407
<dd>A base-ten integer using digits 0-9 (U+0030 to U+0039) in the
@@ -2457,15 +2458,15 @@ depends on the component, as follows:
24572458
<dt>&lt;family-name>
24582459
<dt>&lt;specific-voice>
24592460
<dd>The string
2460-
<a lt="serialize a string">string escaped</a>.
2461+
<a lt="serialize a string">serialized as a string</a>.
24612462

24622463
<dt>&lt;time>
24632464
<dd>The time in seconds serialized as per &lt;number> followed by
24642465
the literal string "<code>s</code>".
24652466

24662467
<dt>&lt;uri>
24672468
<dd>The <a>absolute URL</a>
2468-
<a lt="serialize a URL">URL escaped</a>.
2469+
<a lt="serialize a URL">serialized as URL</a>.
24692470
</dl>
24702471

24712472

@@ -2635,7 +2636,7 @@ The <dfn method for=CSS>escape(<var>ident</var>)</dfn> method must return the re
26352636
<var>ident</var>.
26362637

26372638
<div class=example>
2638-
For example, to escape a string for use as part of a selector, the {{CSS/escape()}} method can be used:
2639+
For example, to serialize a string for use as part of a selector, the {{CSS/escape()}} method can be used:
26392640
<pre>var element = document.querySelector('#' + CSS.escape(id) + ' > img');</pre>
26402641
</div>
26412642

0 commit comments

Comments
 (0)