Skip to content

Commit 1145eaf

Browse files
committed
more tweaks
1 parent 8a1a916 commit 1145eaf

2 files changed

Lines changed: 126 additions & 118 deletions

File tree

cssom/Overview.html

Lines changed: 78 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,7 @@ <h2 class="no-num no-toc" id=toc>Table of Contents</h2>
206206
<li><a href="#css-declaration-blocks"><span class=secno>7.3 </span>CSS
207207
Declaration Blocks</a>
208208
<ul class=toc>
209-
<li><a href="#examples-of-the-css-value-serializing-al"><span
210-
class=secno>7.3.1 </span>Examples of the CSS Value Serializing
211-
Algorithm</a>
209+
<li><a href="#examples0"><span class=secno>7.3.1 </span>Examples</a>
212210

213211
<li><a href="#the-cssstyledeclaration-interface"><span
214212
class=secno>7.3.2 </span>The <code
@@ -293,6 +291,8 @@ <h2 id=conformance><span class=secno>2 </span>Conformance Requirements</h2>
293291
<h2 id=terminology><span class=secno>3 </span>Terminology</h2>
294292

295293
<p class=XXX> <dfn id=resolve-a-url>resolve a URL</dfn>, <dfn
294+
id=case-sensitive>case-sensitive</dfn>, <dfn
295+
id=ascii-case-insensitive>ASCII case-insensitive</dfn>, <dfn
296296
id=url>URL</dfn>, <dfn id=content-type-metadata>Content-Type
297297
metadata</dfn>, <dfn id=supported-styling-language>supported styling
298298
language</dfn>, <dfn
@@ -548,8 +548,8 @@ <h3 id=comparing-media-queries><span class=secno>4.3 </span>Comparing Media
548548

549549
<p>To <dfn id=compare-media-queries>compare media queries</dfn>
550550
<var>m1</var> and <var>m2</var> means to <span title="serializing media
551-
query">serialize</span> them both and return true if they are a
552-
<span>case-sensitive</span> match and false if they are not.
551+
query">serialize</span> them both and return true if they are a <a
552+
href="#case-sensitive">case-sensitive</a> match and false if they are not.
553553

554554
<h3 id=the-medialist-interface><span class=secno>4.4 </span>The <code
555555
title="">MediaList</code> Interface</h3>
@@ -922,13 +922,13 @@ <h3 id=style-sheet-collections><span class=secno>6.2 </span>Style Sheet
922922
<li>
923923
<p>The <a href="#last-style-sheet-set-name">last style sheet set
924924
name</a> is null and the <a href="#style-sheet-title">style sheet
925-
title</a> is a <span>case-sensitive</span> match for the <a
926-
href="#preferred-style-sheet-set-name">preferred style sheet set
927-
name</a>.
925+
title</a> is a <a href="#case-sensitive">case-sensitive</a> match for
926+
the <a href="#preferred-style-sheet-set-name">preferred style sheet
927+
set name</a>.
928928

929929
<li>
930-
<p>The <a href="#style-sheet-title">style sheet title</a> is a
931-
<span>case-sensitive</span> match for the <a
930+
<p>The <a href="#style-sheet-title">style sheet title</a> is a <a
931+
href="#case-sensitive">case-sensitive</a> match for the <a
932932
href="#last-style-sheet-set-name">last style sheet set name</a>.
933933
</ul>
934934

@@ -1019,11 +1019,12 @@ <h3 id=style-sheet-collections><span class=secno>6.2 </span>Style Sheet
10191019
set name</a> to <var title="">name</var>.
10201020

10211021
<li>
1022-
<p>If <var title="">name</var> is not a <span>case-sensitive</span> match
1023-
for <var title="">current</var> and <a
1024-
href="#last-style-sheet-set-name">last style sheet set name</a> is null
1025-
<a href="#enable-a-style-sheet-set">enable a style sheet set</a> with
1026-
name <var title="">new</var>.
1022+
<p>If <var title="">name</var> is not a <a
1023+
href="#case-sensitive">case-sensitive</a> match for <var
1024+
title="">current</var> and <a href="#last-style-sheet-set-name">last
1025+
style sheet set name</a> is null <a
1026+
href="#enable-a-style-sheet-set">enable a style sheet set</a> with name
1027+
<var title="">new</var>.
10271028
</ol>
10281029
<!-- XXX ought to define "applied"
10291030
@@ -1309,9 +1310,9 @@ <h3 id=style-sheet-association><span class=secno>6.3 </span>Style Sheet
13091310
href="#xml-stylesheet-processing-instruction" title="xml-stylesheet
13101311
processing instruction">xml-stylesheet processing instructions</a> and
13111312
HTTP <code title=http-link>Link</code> headers when the link releation
1312-
type is an <span>ASCII case-insensitive</span> match for "<code
1313-
title="">stylesheet</code>" since nobody else was interested in defining
1314-
this.
1313+
type is an <a href="#ascii-case-insensitive">ASCII case-insensitive</a>
1314+
match for "<code title="">stylesheet</code>" since nobody else was
1315+
interested in defining this.
13151316

13161317
<p>The editor is in good hope that HTML and SVG will define the appropriate
13171318
processing in their respective specifications, in terms of this
@@ -1378,7 +1379,7 @@ <h4 id=requirements-on-user-agents-implementing><span class=secno>6.3.3
13781379
<ol>
13791380
<li>
13801381
<p>If there is an <code title="">alternate</code> pseudo-attribute whose
1381-
value is a <span>case-sensitive</span> match for "<code
1382+
value is a <a href="#case-sensitive">case-sensitive</a> match for "<code
13821383
title="">yes</code>" and there is a <code title="">title</code>
13831384
pseudo-attribute whose value is the empty string terminate these steps.
13841385

@@ -1450,8 +1451,8 @@ <h4 id=requirements-on-user-agents-implementing><span class=secno>6.3.3
14501451

14511452
<dd>
14521453
<p>True if the <code title="">alternate</code> pseudo-attribute value
1453-
is a <span>case-sensitive</span> match for "<code>yes</code>".
1454-
Otherwise, false.
1454+
is a <a href="#case-sensitive">case-sensitive</a> match for
1455+
"<code>yes</code>". Otherwise, false.
14551456
</dl>
14561457
</ol>
14571458

@@ -1463,9 +1464,9 @@ <h4 id=requirements-on-user-agents-implementing0><span class=secno>6.3.4
14631464
<!-- XXX title* param does not work (how unexpected -->
14641465

14651466
<p>For each HTTP <code title=http-link>Link</code> header of which one of
1466-
the link relation types is an <span>ASCII case-insensitive</span> match
1467-
for "<code title="">stylesheet</code>" these steps <em class=ct>must</em>
1468-
be run:
1467+
the link relation types is an <a href="#ascii-case-insensitive">ASCII
1468+
case-insensitive</a> match for "<code title="">stylesheet</code>" these
1469+
steps <em class=ct>must</em> be run:
14691470

14701471
<ol>
14711472
<li>
@@ -1474,9 +1475,10 @@ <h4 id=requirements-on-user-agents-implementing0><span class=secno>6.3.4
14741475
If there are no such parameters it is the empty string.
14751476

14761477
<li>
1477-
<p>If one of the (other) link relation types is an <span>ASCII
1478-
case-insensitive</span> match for "<code title="">alternate</code>" and
1479-
<var title="">title</var> is the empty string terminate these steps.
1478+
<p>If one of the (other) link relation types is an <a
1479+
href="#ascii-case-insensitive">ASCII case-insensitive</a> match for
1480+
"<code title="">alternate</code>" and <var title="">title</var> is the
1481+
empty string terminate these steps.
14801482

14811483
<li>
14821484
<p><a href="#resolve-a-url" title="Resolve a URL">Resolve</a> the
@@ -1537,9 +1539,9 @@ <h4 id=requirements-on-user-agents-implementing0><span class=secno>6.3.4
15371539

15381540
<dd>
15391541
<p>True if one of the specified link relation type for this HTTP <code
1540-
title=http-link>Link</code> header is an <span>ASCII
1541-
case-insensitive</span> match for "<code title="">alternate</code>".
1542-
Otherwise, false.
1542+
title=http-link>Link</code> header is an <a
1543+
href="#ascii-case-insensitive">ASCII case-insensitive</a> match for
1544+
"<code title="">alternate</code>". Otherwise, false.
15431545
</dl>
15441546
</ol>
15451547

@@ -2037,21 +2039,16 @@ <h3 id=css-declaration-blocks><span class=secno>7.3 </span>CSS Declaration
20372039
<p class=XXX>To <dfn id=serialize-a-css-declaration-block>serialize a CSS
20382040
declaration block</dfn> ...
20392041

2040-
<p>The rules for <dfn id=parsing-a-css-value title="CSS value
2041-
parsing">parsing a CSS value</dfn> for a given <var
2042-
title="">property</var> are as given in the following algorithm. The
2043-
result is either a CSS value or "null" if the operation failed.
2042+
<p>To <dfn id=parse-a-css-value>parse a CSS value</dfn> for a given <var
2043+
title="">property</var> means to a parse the given value according to the
2044+
definition of <var title="">property</var> in the CSS specification. If
2045+
the given value is <span>ignored</span> return null. Otherwise return the
2046+
CSS value for the given <var title="">property</var>.
20442047

2045-
<ol>
2046-
<li>Parse the value using the <code>S* expr</code> production in
2047-
combination with the allowed values for the given <var
2048-
title="">property</var>. If this fails return "null". Otherwise return
2049-
the parsed value.
2050-
</ol>
2048+
<p>To <dfn id=serialize-a-css-value>serialize a CSS value</dfn> run these
2049+
steps:
20512050

2052-
<p>The rules for <dfn id=serializing-a-css-value title="CSS value
2053-
serializing">serializing a CSS value</dfn> are as given in the following
2054-
algorithm:
2051+
<p class=XXX>This needs some work, obviously.
20552052

20562053
<ol>
20572054
<li>
@@ -2065,10 +2062,8 @@ <h3 id=css-declaration-blocks><span class=secno>7.3 </span>CSS Declaration
20652062
final units for computed length values.</span>
20662063

20672064
<li>
2068-
<p>When a <code>&lt;length></code> of zero is given, then any specified
2069-
units <em class=ct>must</em> be removed.
2070-
</li>
2071-
<!-- apparently "0px" is better for interop -->
2065+
<p>When a <code>&lt;length></code> of zero is given change it to
2066+
"<code>0px</code>"
20722067

20732068
<li>
20742069
<p>A <code>&lt;color></code> value is canonicalized as follows:</p>
@@ -2212,8 +2207,7 @@ <h3 id=css-declaration-blocks><span class=secno>7.3 </span>CSS Declaration
22122207
<p>but the color <code>WINDOWTEXT</code> becomes <code>WindowText</code>.</p>
22132208
</ol>
22142209

2215-
<h4 id=examples-of-the-css-value-serializing-al><span class=secno>7.3.1
2216-
</span>Examples of the CSS Value Serializing Algorithm</h4>
2210+
<h4 id=examples0><span class=secno>7.3.1 </span>Examples</h4>
22172211

22182212
<p>The steps above should guarantee that there is no data loss, from a CSS
22192213
point of
@@ -2308,8 +2302,7 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>7.3.2 </span>The
23082302
setting <code title=cssstyledeclaration-csstext><a
23092303
href="#cssstyledeclaration-csstext">cssText</a></code> would be examples
23102304
of that.</p>
2311-
<!-- XXX Or do we need to specify this independently for each attribute and
2312-
method? -->
2305+
<!-- XXX we should define this in more detail -->
23132306

23142307
<p class=issue><code><a
23152308
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> can represent
@@ -2318,8 +2311,6 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>7.3.2 </span>The
23182311
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> objects
23192312
obviously.)
23202313

2321-
<p class=issue>This object stringifies to its cssText attribute. Or not?
2322-
23232314
<pre
23242315
class=idl>interface <dfn id=cssstyledeclaration>CSSStyleDeclaration</dfn> {
23252316
attribute DOMString <a href="#cssstyledeclaration-csstext" title=cssstyledeclaration-csstext>cssText</a>;
@@ -2334,14 +2325,23 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>7.3.2 </span>The
23342325
};</pre>
23352326

23362327
<p>The <dfn id=cssstyledeclaration-csstext
2337-
title=cssstyledeclaration-csstext><code>cssText</code></dfn> attribute, on
2338-
getting, <span class=issue>...</span>.
2328+
title=cssstyledeclaration-csstext><code>cssText</code></dfn> attribute <em
2329+
class=ct>must</em>, on getting, return the result of <a
2330+
href="#serialize-a-css-declaration-block" title="serialize a CSS
2331+
declaration block">serializing</a> the object.
2332+
2333+
<p>On setting the <code title="">cssText</code> attribute these steps <em
2334+
class=ct>must</em> be run:
23392335

2340-
<p>On setting the <code title="">cssText</code> attribute, user agents <em
2341-
class=ct>must</em> remove all properties currently set on the object and
2342-
then parse the given string as the contents of a declaration block and set
2343-
each property / value pair that is not ignored on the <code><a
2344-
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> block. [CSS]
2336+
<ol>
2337+
<li>
2338+
<p>Remove the <span>list of associated declarations</span>.
2339+
2340+
<li>
2341+
<p><a href="#parse-a-css-declaration-block" title="Parse a CSS
2342+
declaration block">Parse</a> the given value and, if the return value is
2343+
not null, append it to the <span>list of associated declarations</span>.
2344+
</ol>
23452345

23462346
<p>The <dfn id=cssstyledeclaration-getpropertyvalue
23472347
title=cssstyledeclaration-getpropertyvalue><code>getPropertyValue(<var
@@ -2353,13 +2353,14 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>7.3.2 </span>The
23532353
<p>The <dfn id=cssstyledeclaration-getpropertypriority
23542354
title=cssstyledeclaration-getpropertypriority><code>getPropertyPriority(<var
23552355
title="">property</var>)</code></dfn> method, when invoked, if <var
2356-
title="">property</var> case-insensitively matches a specified property
2357-
that has a priority user agents <em class=ct>must</em> return the
2358-
canonical priority of that property as given in the syntax definition.
2359-
Otherwise, the empty string <em class=ct>must</em> be returned.
2356+
title="">property</var> is an <a href="#ascii-case-insensitive">ASCII
2357+
case-insensitive</a> match for a property that has a priority user agents
2358+
<em class=ct>must</em> return the canonical priority of that property as
2359+
given in the syntax definition. Otherwise, the empty string <em
2360+
class=ct>must</em> be returned.
23602361

2361-
<p class=note>For <code>background-color:lime !IMPORTANT</code> the return
2362-
value would be <code>important</code>.
2362+
<p class=example>E.g. for <code>background-color:lime !IMPORTANT</code> the
2363+
return value would be "<code title="">important</code>".
23632364

23642365
<p>The <dfn id=cssstyledeclaration-removeproperty
23652366
title=cssstyledeclaration-removeproperty><code>removeProperty(<var
@@ -2394,18 +2395,19 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>7.3.2 </span>The
23942395
<code>null</code> or the empty string abort this algorithm.
23952396

23962397
<li>
2397-
<p>If <a href="#parsing-a-css-value" title="CSS value parsing">parsing
2398-
the <var title="">value</var></a> returns "null" abort this algorithm.</p>
2398+
<p>If <a href="#parse-a-css-value" title="parse a CSS value">parsing the
2399+
<var title="">value</var></a> returns null abort this algorithm.</p>
23992400

2400-
<p class=note><var title="">value</var> can not include
2401-
<code>!important</code>.</p>
2401+
<p class=note><var title="">value</var> can not include "<code
2402+
title="">!important</code>".</p>
24022403

24032404
<li>
24042405
<p>Finally, set <var title="">property</var> to <var title="">value</var>
24052406
with priority <var title="">priority</var> when <var
24062407
title="">priority</var> is not <code>null</code> or the empty string.
24072408
Otherwise set <var title="">property</var> to <var title="">value</var>.
24082409
</ol>
2410+
<!-- XXX WebIDL work -->
24092411

24102412
<p>The <dfn id=cssstyledeclaration-length
24112413
title=cssstyledeclaration-length><code>length</code></dfn> attribute <em
@@ -2424,6 +2426,12 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>7.3.2 </span>The
24242426
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> is object is
24252427
associated with or <code>null</code> if it is not associated with a
24262428
<code><a href="#cssrule">CSSrule</a></code> object.</p>
2429+
<!-- XXX introduce a concept for this instead -->
2430+
2431+
<h4 id=the-css2properties-interface><span class=secno>7.3.3 </span>The
2432+
<code title="">CSS2Properties</code> Interface</h4>
2433+
2434+
<p class=XXX>not all browsers expose this interface name, drop it?</p>
24272435
<!--
24282436
<h4>CSS Properties</h4>
24292437
@@ -2449,11 +2457,6 @@ <h4>CSS Properties</h4>
24492457
for instance.</p>
24502458
-->
24512459

2452-
<h4 id=the-css2properties-interface><span class=secno>7.3.3 </span>The
2453-
<code title="">CSS2Properties</code> Interface</h4>
2454-
2455-
<p class=XXX>...
2456-
24572460
<h2 id=css-property-value-apis><span class=secno>8 </span>CSS Property
24582461
Value APIs</h2>
24592462

0 commit comments

Comments
 (0)