Skip to content

Commit 9683453

Browse files
committed
Formatting tweaks. Editorial.
1 parent 976d651 commit 9683453

2 files changed

Lines changed: 83 additions & 70 deletions

File tree

css3-values/Overview.html

Lines changed: 81 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ <h2 class="no-num no-toc" id=status>Status of this document</h2>
139139
&lsquo;<a href="#vw-unit"><code class=css>vw</code></a>&rsquo;, &lsquo;<a
140140
href="#vm-unit"><code class=css>vm</code></a>&rsquo;, &lsquo;<a
141141
href="#fr-unit"><code class=css>fr</code></a>&rsquo;, &lsquo;<a
142-
href="#gr-unit"><code class=css>gr</code></a>&rsquo;, &lsquo;<code
143-
class=css>cycle()</code>&rsquo;, &lsquo;<code
144-
class=css>attr()</code>&rsquo;.
142+
href="#gr-unit"><code class=css>gr</code></a>&rsquo;, &lsquo;<a
143+
href="#cycle-value"><code class=css>cycle()</code></a>&rsquo;, &lsquo;<a
144+
href="#attr-value"><code class=css>attr()</code></a>&rsquo;.
145145

146146
<h2 class="no-num no-toc" id=contents>Table of contents</h2>
147147
<!--begin-toc-->
@@ -1452,37 +1452,38 @@ <h3 id=calc><span class=secno>9.1. </span> Mathematical Expressions:
14521452
treated as if &lsquo;<code class=property>auto</code>&rsquo; had been
14531453
specified.
14541454

1455-
<h3 id=cycle><span class=secno>9.2. </span> Cycling Values: &lsquo;<code
1456-
class=css>cycle()</code>&rsquo;</h3>
1455+
<h3 id=cycle><span class=secno>9.2. </span> Cycling Values: &lsquo;<a
1456+
href="#cycle-value"><code class=css>cycle()</code></a>&rsquo;</h3>
14571457

1458-
<p>The <dfn id=cycle0>&lsquo;<code class=css>cycle()</code>&rsquo;</dfn>
1459-
expression allows descendant elements to cycle over a list of values
1460-
instead of inheriting the same value. The syntax of the &lsquo;<code
1461-
class=css>cycle()</code>&rsquo; expression is:
1458+
<p>The <dfn id=cycle-value>cycle()</dfn> expression allows descendant
1459+
elements to cycle over a list of values instead of inheriting the same
1460+
value. The syntax of the &lsquo;<a href="#cycle-value"><code
1461+
class=css>cycle()</code></a>&rsquo; expression is:
14621462

14631463
<pre>cycle( &lt;value&gt;# )</pre>
14641464

14651465
<p>where <code>&lt;value&gt;</code> is a CSS value that is valid where the
14661466
expression is placed. If any of the values inside are not valid, then the
1467-
entire &lsquo;<code class=css>cycle()</code>&rsquo; expression is invalid.
1468-
1469-
1470-
<p>The value returned by &lsquo;<code class=css>cycle()</code>&rsquo; must
1471-
be determined by comparing the inherited value <var>I</var> (the computed
1472-
value on the parent, or, for the root, the initial value) to the computed
1473-
values <var>C<sub>n</sub></var> returned by the <var>n</var>-th argument
1474-
to &lsquo;<code class=css>cycle()</code>&rsquo;. For the earliest
1475-
<var>C<sub>n</sub></var> such that <var>C<sub>n</sub></var> =
1476-
<var>I</var>, the value returned by cycle is <var>C<sub>n+1</sub></var>.
1477-
However, if this <var>C<sub>n</sub></var> is the last value, or if there
1478-
are no <var>C<sub>n</sub></var> that equal <var>I</var>, the computed
1479-
value of the first value is returned instead.
1480-
1481-
<p class=note>Note that &lsquo;<code class=css>cycle()</code>&rsquo;
1482-
explicitly looks at the computed value of the parent, so it is useful even
1483-
for non-inherited properties. This is similar to the &lsquo;<code
1484-
class=css>inherit</code>&rsquo; keyword, which is useful even for
1485-
non-inherited properties.
1467+
entire &lsquo;<a href="#cycle-value"><code
1468+
class=css>cycle()</code></a>&rsquo; expression is invalid.
1469+
1470+
<p>The value returned by &lsquo;<a href="#cycle-value"><code
1471+
class=css>cycle()</code></a>&rsquo; must be determined by comparing the
1472+
inherited value <var>I</var> (the computed value on the parent, or, for
1473+
the root, the initial value) to the computed values
1474+
<var>C<sub>n</sub></var> returned by the <var>n</var>-th argument to
1475+
&lsquo;<a href="#cycle-value"><code class=css>cycle()</code></a>&rsquo;.
1476+
For the earliest <var>C<sub>n</sub></var> such that
1477+
<var>C<sub>n</sub></var> = <var>I</var>, the value returned by cycle is
1478+
<var>C<sub>n+1</sub></var>. However, if this <var>C<sub>n</sub></var> is
1479+
the last value, or if there are no <var>C<sub>n</sub></var> that equal
1480+
<var>I</var>, the computed value of the first value is returned instead.
1481+
1482+
<p class=note>Note that &lsquo;<a href="#cycle-value"><code
1483+
class=css>cycle()</code></a>&rsquo; explicitly looks at the computed value
1484+
of the parent, so it is useful even for non-inherited properties. This is
1485+
similar to the &lsquo;<code class=css>inherit</code>&rsquo; keyword, which
1486+
is useful even for non-inherited properties.
14861487

14871488
<div class=example>
14881489
<pre>
@@ -1500,37 +1501,40 @@ <h3 id=cycle><span class=secno>9.2. </span> Cycling Values: &lsquo;<code
15001501
li > ul { list-style-type: cycle(disk, circle, square, box); }</pre>
15011502
</div>
15021503

1503-
<p>The &lsquo;<code class=css>cycle()</code>&rsquo; notation is not allowed
1504-
to be nested; nor may it contain &lsquo;<code
1505-
class=css>attr()</code>&rsquo;, &lsquo;<a href="#calc0"><code
1504+
<p>The &lsquo;<a href="#cycle-value"><code
1505+
class=css>cycle()</code></a>&rsquo; notation is not allowed to be nested;
1506+
nor may it contain &lsquo;<a href="#attr-value"><code
1507+
class=css>attr()</code></a>&rsquo;, &lsquo;<a href="#calc0"><code
15061508
class=css>calc()</code></a>&rsquo;, &lsquo;<a href="#min"><code
15071509
class=css>min()</code></a>&rsquo;, or &lsquo;<a href="#max"><code
15081510
class=css>max()</code></a>&rsquo; notations. Declarations containing such
15091511
constructs are invalid.
15101512

1511-
<h3 id=attr><span class=secno>9.3. </span> Attribute References:
1512-
&lsquo;<code class=css>attr()</code>&rsquo;</h3>
1513+
<h3 id=attr><span class=secno>9.3. </span> Attribute References: &lsquo;<a
1514+
href="#attr-value"><code class=css>attr()</code></a>&rsquo;</h3>
15131515

1514-
<p>The &lsquo;<code class=css>attr()</code>&rsquo; function returns the
1515-
value of an attribute on the element for use as a value in a property. If
1516-
used on a pseudo-element, it returns the value of the attribute on the
1516+
<p>The <dfn id=attr-value>attr()</dfn> function returns the value of an
1517+
attribute on the element for use as a value in a property. If used on a
1518+
pseudo-element, it returns the value of the attribute on the
15171519
pseudo-element's originating element.
15181520

15191521
<p>In CSS2.1 <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>,
1520-
the &lsquo;<code class=css>attr()</code>&rsquo; expression always returns
1521-
a string. In CSS3, the &lsquo;<code class=css>attr()</code>&rsquo;
1522-
expression can return many different types. The &lsquo;<code
1523-
class=css>attr()</code>&rsquo; expression cannot return everything, for
1524-
example it cannot do counters, named strings, quotes, or values such as
1525-
&lsquo;<code class=css>auto</code>&rsquo;, &lsquo;<code
1522+
the &lsquo;<a href="#attr-value"><code class=css>attr()</code></a>&rsquo;
1523+
expression always returns a string. In CSS3, the &lsquo;<a
1524+
href="#attr-value"><code class=css>attr()</code></a>&rsquo; expression can
1525+
return many different types. The &lsquo;<a href="#attr-value"><code
1526+
class=css>attr()</code></a>&rsquo; expression cannot return everything,
1527+
for example it cannot do counters, named strings, quotes, or values such
1528+
as &lsquo;<code class=css>auto</code>&rsquo;, &lsquo;<code
15261529
class=css>nowrap</code>&rsquo;, or &lsquo;<code
15271530
class=css>baseline</code>&rsquo;. This is intentional, as the intent of
1528-
the &lsquo;<code class=css>attr()</code>&rsquo; expression is not to make
1529-
it possible to describe a presentational language's formatting using CSS,
1530-
but to enable CSS to take semantic data into account.
1531+
the &lsquo;<a href="#attr-value"><code class=css>attr()</code></a>&rsquo;
1532+
expression is not to make it possible to describe a presentational
1533+
language's formatting using CSS, but to enable CSS to take semantic data
1534+
into account.
15311535

1532-
<p>The new syntax for the &lsquo;<code class=css>attr()</code>&rsquo;
1533-
expression is:
1536+
<p>The new syntax for the &lsquo;<a href="#attr-value"><code
1537+
class=css>attr()</code></a>&rsquo; expression is:
15341538

15351539
<pre>'attr(' <a
15361540
href="#wqname"><var>wqname</var></a> [ ',' &lt;type> [ ',' &lt;value> ]? ]? ')'</pre>
@@ -1547,29 +1551,33 @@ <h3 id=attr><span class=secno>9.3. </span> Attribute References:
15471551
<!-- TODO: Delete this syntax definition when Namespaces is updated to contain the wqname production -->
15481552

15491553
<p>The <a href="#wqname"><i>wqname</i></a> argument represents an attribute
1550-
name. The computed value of the &lsquo;<code
1551-
class=css>attr()</code>&rsquo; expression is the value of the attribute
1552-
with that name on the element, according to the rules given below.
1554+
name. The computed value of the &lsquo;<a href="#attr-value"><code
1555+
class=css>attr()</code></a>&rsquo; expression is the value of the
1556+
attribute with that name on the element, according to the rules given
1557+
below.
15531558

15541559
<p>The &lsquo;<code class=css>&lt;type></code>&rsquo; argument (which is
15551560
optional but must be present if the third argument is present) is a
15561561
keyword drawn from the list below that tells the UA how to interpret the
15571562
attribute value. If omitted, &lsquo;<code class=css>string</code>&rsquo;
1558-
is implied. If the type is not valid for where the &lsquo;<code
1559-
class=css>attr()</code>&rsquo; expression is placed, the whole
1560-
&lsquo;<code class=css>attr()</code>&rsquo; expression is invalid.
1563+
is implied. If the type is not valid for where the &lsquo;<a
1564+
href="#attr-value"><code class=css>attr()</code></a>&rsquo; expression is
1565+
placed, the whole &lsquo;<a href="#attr-value"><code
1566+
class=css>attr()</code></a>&rsquo; expression is invalid.
15611567

15621568
<p>The &lsquo;<code class=css>&lt;value></code>&rsquo; argument (which is
1563-
optional) is a CSS value which must be valid where the &lsquo;<code
1564-
class=css>attr()</code>&rsquo; expression is placed. It represents a
1565-
fallback value to be used if the named attribute is missing, or its value
1566-
cannot be parsed into the given type or is invalid/out-of-range for the
1567-
property. If the &lsquo;<code class=css>&lt;value></code>&rsquo; argument
1568-
is not valid for the property where the &lsquo;<code
1569-
class=css>attr()</code>&rsquo; expression is placed, the whole
1570-
&lsquo;<code class=css>attr()</code>&rsquo; expression is invalid. If the
1571-
fallback &lsquo;<code class=css>&lt;value></code>&rsquo; is absent, the
1572-
default value for the given type (from the list below) is implied.
1569+
optional) is a CSS value which must be valid where the &lsquo;<a
1570+
href="#attr-value"><code class=css>attr()</code></a>&rsquo; expression is
1571+
placed. It represents a fallback value to be used if the named attribute
1572+
is missing, or its value cannot be parsed into the given type or is
1573+
invalid/out-of-range for the property. If the &lsquo;<code
1574+
class=css>&lt;value></code>&rsquo; argument is not valid for the property
1575+
where the &lsquo;<a href="#attr-value"><code
1576+
class=css>attr()</code></a>&rsquo; expression is placed, the whole
1577+
&lsquo;<a href="#attr-value"><code class=css>attr()</code></a>&rsquo;
1578+
expression is invalid. If the fallback &lsquo;<code
1579+
class=css>&lt;value></code>&rsquo; is absent, the default value for the
1580+
given type (from the list below) is implied.
15731581

15741582
<p class=note>Note that the default value need not be of the type given.
15751583
For instance, if the type required of the attribute by the author is
@@ -1752,9 +1760,11 @@ <h3 id=attr><span class=secno>9.3. </span> Attribute References:
17521760
color: attr(color); /* 'color' doesn't accept strings */</pre>
17531761
</div>
17541762

1755-
<p class=note>The &lsquo;<code class=css>attr()</code>&rsquo; expression
1756-
cannot currently fall back onto another attribute. Future versions of CSS
1757-
may extend &lsquo;<code class=css>attr()</code>&rsquo; in this direction.</p>
1763+
<p class=note>The &lsquo;<a href="#attr-value"><code
1764+
class=css>attr()</code></a>&rsquo; expression cannot currently fall back
1765+
onto another attribute. Future versions of CSS may extend &lsquo;<a
1766+
href="#attr-value"><code class=css>attr()</code></a>&rsquo; in this
1767+
direction.</p>
17581768
<!--
17591769
<h4>The 'counter' function</h4>
17601770
@@ -2264,6 +2274,9 @@ <h2 class=no-num id=index>Index</h2>
22642274
<li>&lt;angle&gt;, <a href="#angle-value"
22652275
title="&lt;angle&gt;"><strong>6.1.</strong></a>
22662276

2277+
<li>attr(), <a href="#attr-value" title="attr()"><strong>9.3.</strong></a>
2278+
2279+
22672280
<li>calc(), <a href="#calc0" title="calc()"><strong>9.1.</strong></a>
22682281

22692282
<li>ch, <a href="#ch-unit" title=ch><strong>5.1.1.</strong></a>
@@ -2274,8 +2287,8 @@ <h2 class=no-num id=index>Index</h2>
22742287
<li>computed value, <a href="#computed-value"
22752288
title="computed value"><strong>10.2.</strong></a>
22762289

2277-
<li>&lsquo;<code class=css>cycle()</code>&rsquo;, <a href="#cycle0"
2278-
title="''cycle()''"><strong>9.2.</strong></a>
2290+
<li>cycle(), <a href="#cycle-value"
2291+
title="cycle()"><strong>9.2.</strong></a>
22792292

22802293
<li>deg, <a href="#deg" title=deg><strong>6.1.</strong></a>
22812294

css3-values/Overview.src.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ <h3 id="calc">
999999
<h3 id="cycle">
10001000
Cycling Values: ''cycle()''</h3>
10011001

1002-
<p>The <dfn>''cycle()''</dfn> expression allows descendant elements
1002+
<p>The <dfn id='cycle-value'>cycle()</dfn> expression allows descendant elements
10031003
to cycle over a list of values instead of inheriting the same value.
10041004
The syntax of the ''cycle()'' expression is:
10051005

@@ -1049,7 +1049,7 @@ <h3 id="cycle">
10491049
<h3 id="attr">
10501050
Attribute References: ''attr()''</h3>
10511051

1052-
<p>The ''attr()'' function returns the value of an attribute on the element
1052+
<p>The <dfn id='attr-value'>attr()</dfn> function returns the value of an attribute on the element
10531053
for use as a value in a property. If used on a pseudo-element, it returns
10541054
the value of the attribute on the pseudo-element's originating element.</p>
10551055

0 commit comments

Comments
 (0)