Skip to content

Commit 9db1556

Browse files
committed
fix a few things around CSS declaration blocks
1 parent 560448f commit 9db1556

2 files changed

Lines changed: 63 additions & 66 deletions

File tree

cssom/Overview.html

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,7 @@ <h3 id=css-rules><span class=secno>6.4. </span>CSS Rules</h3>
18451845
<p>To <dfn id=serialize-a-css-rule>serialize a CSS rule</dfn> depends on
18461846
the type of CSS rule, as follows:
18471847

1848-
<dl>
1848+
<dl class=switch>
18491849
<dt><code><a href="#cssstylerule">CSSStyleRule</a></code>
18501850

18511851
<dd class=XXX>...
@@ -2295,44 +2295,42 @@ <h4 id=css-namespace-rule><span class=secno>6.4.8. </span>CSS <code
22952295
<h3 id=css-declaration-blocks><span class=secno>6.5. </span>CSS Declaration
22962296
Blocks</h3>
22972297

2298-
<p class=XXX>To <dfn id=parse-a-css-declaration-block>parse a CSS
2299-
declaration block</dfn> ...
2300-
2301-
<p class=XXX>To <dfn id=serialize-a-css-declaration-block>serialize a CSS
2302-
declaration block</dfn> ...
2303-
2304-
<h4 id=the-cssstyledeclaration-interface><span class=secno>6.5.1.
2305-
</span>The <code title="">CSSStyleDeclaration</code> Interface</h4>
2306-
2307-
<p>Objects implementing the <code><a
2308-
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> interface give
2309-
access to read and manipulate CSS properties and their values within a
2310-
declaration block.
2311-
2312-
<p>Objects implementing the <code><a
2313-
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> interface have
2314-
the following associated concepts:
2298+
<p>A <dfn id=css-declaration-block>CSS declaration block</dfn> is an
2299+
ordered collection of CSS properties with their associated values, also
2300+
named CSS declarations. In the DOM a <a href="#css-declaration-block">CSS
2301+
declaration block</a> is a <code><a
2302+
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> object. A <a
2303+
href="#css-declaration-block">CSS declaration block</a> has two associated
2304+
properties:
23152305

23162306
<dl>
23172307
<dt><dfn id=css-declaration-block-readonly-flag>CSS declaration block
23182308
readonly flag</dfn>
23192309

23202310
<dd>
2321-
<p>Indicates whether or not the object can be modified (as detailed
2322-
below). True when it cannot. False otherwise and by default.
2323-
</dd>
2324-
<!--
2325-
<dt><dfn>CSS declaration block value type</dfn></dt>
2326-
<dd><p>Indicates the type of value
2327-
2328-
-->
2311+
<p>False if the object can be manipulated. True if it can not be
2312+
manipulated. If not explicitly set its value is false.
23292313

2330-
<dt><dfn id=collection-of-css-declarations>collection of CSS
2314+
<dt><dfn id=css-declaration-block-declarations>CSS declaration block
23312315
declarations</dfn>
23322316

23332317
<dd>
23342318
<p>The CSS declarations associated with the object.
23352319
</dl>
2320+
2321+
<p class=note>The <a href="#css-declaration-block-declarations">CSS
2322+
declaration block declarations</a> are ordered. This matters for the <code
2323+
title=dom-CSSStyleDeclaration-item><a
2324+
href="#dom-cssstyledeclaration-item">item()</a></code> method.
2325+
2326+
<p class=XXX>To <dfn id=parse-a-css-declaration-block>parse a CSS
2327+
declaration block</dfn> ...
2328+
2329+
<p class=XXX>To <dfn id=serialize-a-css-declaration-block>serialize a CSS
2330+
declaration block</dfn> ...
2331+
2332+
<h4 id=the-cssstyledeclaration-interface><span class=secno>6.5.1.
2333+
</span>The <code title="">CSSStyleDeclaration</code> Interface</h4>
23362334
<!-- XXX review nullable DOMString more carefully (DOMString?) -->
23372335

23382336
<pre
@@ -2477,7 +2475,8 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>6.5.1.
24772475
<em class=ct>must</em>, on getting, return the result of <a
24782476
href="#serialize-a-css-declaration-block" title="serialize a CSS
24792477
declaration block">serializing</a> the <a
2480-
href="#collection-of-css-declarations">collection of CSS declarations</a>.
2478+
href="#css-declaration-block-declarations">CSS declaration block
2479+
declarations</a>.
24812480

24822481
<p>On setting the <code title="">cssText</code> attribute these steps <em
24832482
class=ct>must</em> be run:
@@ -2489,14 +2488,14 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>6.5.1.
24892488
<code>NO_MODIFICATION_ALLOWED_ERR</code> and terminate this algorithm.
24902489

24912490
<li>
2492-
<p>Empty the <a href="#collection-of-css-declarations">collection of CSS
2493-
declarations</a>.
2491+
<p>Empty the <a href="#css-declaration-block-declarations">CSS
2492+
declaration block declarations</a>.
24942493

24952494
<li>
24962495
<p><a href="#parse-a-css-declaration-block" title="Parse a CSS
24972496
declaration block">Parse</a> the given value and, if the return value is
2498-
not null, append it to the <a
2499-
href="#collection-of-css-declarations">collection of CSS
2497+
not null, insert it into the <a
2498+
href="#css-declaration-block-declarations">CSS declaration block
25002499
declarations</a>.
25012500
</ol>
25022501

@@ -2533,9 +2532,8 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>6.5.1.
25332532
<li>
25342533
<p>If <var title="">property</var> is an <a
25352534
href="#ascii-case-insensitive">ASCII case-insensitive</a> match for a
2536-
property of a declaration in the <a
2537-
href="#collection-of-css-declarations">collection of CSS
2538-
declarations</a> remove the declaration.</p>
2535+
property of a declaration in the <span>collection of CSS
2536+
declarations</span> remove the declaration.</p>
25392537
</ol>
25402538

25412539
<p>When the <dfn id=dom-cssstyledeclaration-setproperty
@@ -2588,14 +2586,14 @@ <h4 id=the-cssstyledeclaration-interface><span class=secno>6.5.1.
25882586

25892587
<p>The <dfn id=dom-cssstyledeclaration-length
25902588
title=dom-CSSStyleDeclaration-length><code>length</code></dfn> attribute
2591-
<em class=ct>must</em> return the number of declarations in the <a
2592-
href="#collection-of-css-declarations">collection of CSS declarations</a>.
2589+
<em class=ct>must</em> return the number of declarations in the
2590+
<span>collection of CSS declarations</span>.
25932591

25942592
<p>The <dfn id=dom-cssstyledeclaration-item
25952593
title=dom-CSSStyleDeclaration-item><code>item(<var
25962594
title="">index</var>)</code></dfn> method, when invoked, <span
25972595
class=XXX>...</span>.</p>
2598-
<!-- returns the value of property x stored at position item. -->
2596+
<!-- returns the name of property at position index. -->
25992597

26002598
<p>The <dfn id=dom-cssstyledeclaration-parentrule
26012599
title=dom-CSSStyleDeclaration-parentRule><code>parentRule</code></dfn>

cssom/Overview.src.html

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ <h3>CSS Rules</h3>
14941494
<p>To <dfn>serialize a CSS rule</dfn> depends on the type of CSS rule, as
14951495
follows:</p>
14961496

1497-
<dl>
1497+
<dl class="switch">
14981498
<dt><code>CSSStyleRule</code></dt>
14991499
<dd class=XXX>...</dd>
15001500

@@ -1875,6 +1875,26 @@ <h4>CSS <code title="">@namespace</code> Rule</h4>
18751875

18761876

18771877
<h3>CSS Declaration Blocks</h3>
1878+
1879+
<p>A <dfn>CSS declaration block</dfn> is an ordered collection of CSS
1880+
properties with their associated values, also named CSS declarations. In
1881+
the DOM a <span>CSS declaration block</span> is a
1882+
<code>CSSStyleDeclaration</code> object. A
1883+
<span>CSS declaration block</span> has two associated properties:</p>
1884+
1885+
<dl>
1886+
<dt><dfn>CSS declaration block readonly flag</dfn></dt>
1887+
<dd><p>False if the object can be manipulated. True if it can not be
1888+
manipulated. If not explicitly set its value is false.</p></dd>
1889+
1890+
<dt><dfn>CSS declaration block declarations</dfn></dt>
1891+
<dd><p>The CSS declarations associated with the object.</p></dd>
1892+
</dl>
1893+
1894+
<p class="note">The <span>CSS declaration block declarations</span> are
1895+
ordered. This matters for the
1896+
<code title="dom-CSSStyleDeclaration-item">item()</code> method.</p>
1897+
18781898

18791899
<p class="XXX">To
18801900
<dfn id="parse-a-css-declaration-block">parse a CSS declaration block</dfn>
@@ -1888,28 +1908,6 @@ <h3>CSS Declaration Blocks</h3>
18881908

18891909
<h4>The <code title="">CSSStyleDeclaration</code> Interface</h4>
18901910

1891-
<p>Objects implementing the <code>CSSStyleDeclaration</code> interface
1892-
give access to read and manipulate CSS properties and their values within
1893-
a declaration block.</p>
1894-
1895-
<p>Objects implementing the <code>CSSStyleDeclaration</code> interface
1896-
have the following associated concepts:</p>
1897-
1898-
<dl>
1899-
<dt><dfn>CSS declaration block readonly flag</dfn></dt>
1900-
<dd><p>Indicates whether or not the object can be modified (as detailed
1901-
below). True when it cannot. False otherwise and by default.</p></dd>
1902-
1903-
<!--
1904-
<dt><dfn>CSS declaration block value type</dfn></dt>
1905-
<dd><p>Indicates the type of value
1906-
1907-
-->
1908-
1909-
<dt><dfn>collection of CSS declarations</dfn></dt>
1910-
<dd><p>The CSS declarations associated with the object.</p></dd>
1911-
</dl>
1912-
19131911
<!-- XXX review nullable DOMString more carefully (DOMString?) -->
19141912

19151913
<pre class="idl">interface <dfn>CSSStyleDeclaration</dfn> {
@@ -1931,7 +1929,7 @@ <h4>The <code title="">CSSStyleDeclaration</code> Interface</h4>
19311929
<dfn id="dom-cssstyledeclaration-csstext" title="dom-CSSStyleDeclaration-cssText"><code>cssText</code></dfn>
19321930
attribute <em class="ct">must</em>, on getting, return the result of
19331931
<span title="serialize a CSS declaration block">serializing</span> the
1934-
<span>collection of CSS declarations</span>.</p>
1932+
<span>CSS declaration block declarations</span>.</p>
19351933

19361934
<p>On setting the <code title="">cssText</code> attribute these steps
19371935
<em class="ct">must</em> be run:</p>
@@ -1941,11 +1939,12 @@ <h4>The <code title="">CSSStyleDeclaration</code> Interface</h4>
19411939
raise a <code>NO_MODIFICATION_ALLOWED_ERR</code> and terminate this
19421940
algorithm.</p></li>
19431941

1944-
<li><p>Empty the <span>collection of CSS declarations</span>.</p></li>
1942+
<li><p>Empty the
1943+
<span>CSS declaration block declarations</span>.</p></li>
19451944

19461945
<li><p><span title="Parse a CSS declaration block">Parse</span> the given
1947-
value and, if the return value is not null, append it to the
1948-
<span>collection of CSS declarations</span>.</p></li>
1946+
value and, if the return value is not null, insert it into the
1947+
<span>CSS declaration block declarations</span>.</p></li>
19491948
</ol>
19501949

19511950
<p>The
@@ -2028,7 +2027,7 @@ <h4>The <code title="">CSSStyleDeclaration</code> Interface</h4>
20282027
<p>The
20292028
<dfn id="dom-cssstyledeclaration-item" title="dom-CSSStyleDeclaration-item"><code>item(<var title="">index</var>)</code></dfn>
20302029
method, when invoked, <span class="XXX">...</span>.</p>
2031-
<!-- returns the value of property x stored at position item. -->
2030+
<!-- returns the name of property at position index. -->
20322031

20332032
<p>The
20342033
<dfn id="dom-cssstyledeclaration-parentrule" title="dom-CSSStyleDeclaration-parentRule"><code>parentRule</code></dfn>

0 commit comments

Comments
 (0)