Skip to content

Commit 134378a

Browse files
committed
Clarify how the attribute value is parsed.
1 parent 5b53ffa commit 134378a

2 files changed

Lines changed: 41 additions & 42 deletions

File tree

css3-values/Overview.html

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,17 +1678,17 @@ <h3 id=attr-notation><span class=secno>8.3. </span> Attribute References:
16781678
<dl>
16791679
<dt>&lsquo;<code class=css>string</code>&rsquo;
16801680

1681-
<dd>The attribute value will be interpreted as the contents of a CSS
1681+
<dd>The attribute value will be parsed as the contents of a CSS
16821682
<var>&lt;string></var>. The default is the empty string.
16831683

16841684
<dt>&lsquo;<code class=css>color</code>&rsquo;
16851685

1686-
<dd>The attribute value will be interpreted as a CSS <var>&lt;color></var>
1686+
<dd>The attribute value will be parsed as a CSS <var>&lt;color></var>
16871687
value. The default is &lsquo;<code class=css>currentColor</code>&rsquo;.
16881688

16891689
<dt>&lsquo;<a href="#url"><code class=css>url</code></a>&rsquo;
16901690

1691-
<dd>The attribute value will be interpreted as the argument of a &lsquo;<a
1691+
<dd>The attribute value will be parsed as the argument of a &lsquo;<a
16921692
href="#url"><code class=css>url()</code></a>&rsquo; expression. The
16931693
default is a UA-dependent URI defined to point to a non-existent document
16941694
with a generic error condition. (i.e. it shouldn't be an FTP URI that
@@ -1699,21 +1699,21 @@ <h3 id=attr-notation><span class=secno>8.3. </span> Attribute References:
16991699

17001700
<dt>&lsquo;<a href="#integer"><code class=css>integer</code></a>&rsquo;
17011701

1702-
<dd>The attribute value will be interpreted as a CSS
1703-
<var>&lt;integer></var>. The default is &lsquo;<code
1704-
class=css>0</code>&rsquo;, or else the property's minimum value if
1705-
&lsquo;<code class=css>0</code>&rsquo; is not valid for the property. The
1706-
default should also be used if the property in question only accepts
1707-
integers within a certain range and the attribute is out of range.
1702+
<dd>The attribute value will be parsed as a CSS <var>&lt;integer></var>.
1703+
The default is &lsquo;<code class=css>0</code>&rsquo;, or else the
1704+
property's minimum value if &lsquo;<code class=css>0</code>&rsquo; is not
1705+
valid for the property. The default should also be used if the property
1706+
in question only accepts integers within a certain range and the
1707+
attribute is out of range.
17081708

17091709
<dt>&lsquo;<a href="#number"><code class=css>number</code></a>&rsquo;
17101710

1711-
<dd>The attribute value will be interpreted as a CSS
1712-
<var>&lt;number></var>. The default is &lsquo;<code
1713-
class=css>0.0</code>&rsquo;, or else the property's minimum value if
1714-
&lsquo;<code class=css>0.0</code>&rsquo; is not valid for the property.
1715-
The default should also be used if the property in question only accepts
1716-
numbers within a certain range and the attribute is out of range.
1711+
<dd>The attribute value will be parsed as a CSS <var>&lt;number></var>.
1712+
The default is &lsquo;<code class=css>0.0</code>&rsquo;, or else the
1713+
property's minimum value if &lsquo;<code class=css>0.0</code>&rsquo; is
1714+
not valid for the property. The default should also be used if the
1715+
property in question only accepts numbers within a certain range and the
1716+
attribute is out of range.
17171717

17181718
<dt>&lsquo;<code class=css>length</code>&rsquo;
17191719

@@ -1723,17 +1723,17 @@ <h3 id=attr-notation><span class=secno>8.3. </span> Attribute References:
17231723

17241724
<dt>&lsquo;<code class=css>frequency</code>&rsquo;
17251725

1726-
<dd>The attribute value will be interpreted as a CSS
1727-
<var>&lt;length></var>, <var>&lt;angle></var>, <var>&lt;time></var> or
1728-
<var>&lt;frequency></var> (respectively), and the unit identifier (if
1729-
any) will appear in the attribute value. The default is &lsquo;<code
1730-
class=css>0</code>&rsquo; in the relevant units, or else the property's
1731-
minimum value if &lsquo;<code class=css>0</code>&rsquo; in the relevant
1732-
units is not valid for the property. The default should also be used if
1733-
the property in question only accepts values within a certain range (e.g.
1734-
positive lengths or angles from 0 to 90deg) and the attribute is out of
1735-
range (e.g. a negative length or 180deg). If the unit is a relative
1736-
length, it must be computed to an absolute length.
1726+
<dd>The attribute value will be parsed as a CSS <var>&lt;length></var>,
1727+
<var>&lt;angle></var>, <var>&lt;time></var> or <var>&lt;frequency></var>
1728+
(respectively), and the unit identifier (if any) will appear in the
1729+
attribute value. The default is &lsquo;<code class=css>0</code>&rsquo; in
1730+
the relevant units, or else the property's minimum value if &lsquo;<code
1731+
class=css>0</code>&rsquo; in the relevant units is not valid for the
1732+
property. The default should also be used if the property in question
1733+
only accepts values within a certain range (e.g. positive lengths or
1734+
angles from 0 to 90deg) and the attribute is out of range (e.g. a
1735+
negative length or 180deg). If the unit is a relative length, it must be
1736+
computed to an absolute length.
17371737

17381738
<dt>&lsquo;<a href="#em-unit"><code class=css>em</code></a>&rsquo;
17391739

@@ -1775,14 +1775,13 @@ <h3 id=attr-notation><span class=secno>8.3. </span> Attribute References:
17751775

17761776
<dt>&lsquo;<code class=css>%</code>&rsquo;
17771777

1778-
<dd>The attribute value will be interpreted as a CSS &lsquo;<a
1779-
href="#number"><code class=css>NUMBER</code></a>&rsquo; token, with the
1780-
given type suffixed as a unit, to create a dimension with the given
1781-
unit's type. The default is &lsquo;<code class=css>0</code>&rsquo; in the
1782-
relevant units, or else the property's minimum value if &lsquo;<code
1783-
class=css>0</code>&rsquo; in the relevant units is not valid for the
1784-
property. If the unit is a relative length, it must be computed to an
1785-
absolute length.
1778+
<dd>The attribute value will be parsed as a CSS <var>&lt;number></var>,
1779+
with the given type suffixed as a unit to create a dimension with the
1780+
given unit's type. The default is &lsquo;<code class=css>0</code>&rsquo;
1781+
in the relevant units, or else the property's minimum value if
1782+
&lsquo;<code class=css>0</code>&rsquo; in the relevant units is not valid
1783+
for the property. If the unit is a relative length, it must be computed
1784+
to an absolute length.
17861785
</dl>
17871786

17881787
<div class=example>

css3-values/Overview.src.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,15 +1197,15 @@ <h3 id="attr-notation">
11971197

11981198
<dl>
11991199
<dt>''string''
1200-
<dd>The attribute value will be interpreted as the contents of a CSS
1200+
<dd>The attribute value will be parsed as the contents of a CSS
12011201
<var>&lt;string></var>. The default is the empty string.
12021202

12031203
<dt>''color''
1204-
<dd>The attribute value will be interpreted as a CSS <var>&lt;color></var> value.
1204+
<dd>The attribute value will be parsed as a CSS <var>&lt;color></var> value.
12051205
The default is ''currentColor''.
12061206

12071207
<dt>''url''
1208-
<dd>The attribute value will be interpreted as the argument of a
1208+
<dd>The attribute value will be parsed as the argument of a
12091209
''url()'' expression. The default is a UA-dependent URI defined
12101210
to point to a non-existent document with a generic error
12111211
condition. (i.e. it shouldn't be an FTP URI that causes a DNS
@@ -1215,13 +1215,13 @@ <h3 id="attr-notation">
12151215
originating from the element; they are not relative to the style sheet.
12161216

12171217
<dt>''integer''
1218-
<dd>The attribute value will be interpreted as a CSS <var>&lt;integer></var>.
1218+
<dd>The attribute value will be parsed as a CSS <var>&lt;integer></var>.
12191219
The default is ''0'', or else the property's minimum value if ''0'' is not valid for the property. The default should also be used if the property
12201220
in question only accepts integers within a certain range and
12211221
the attribute is out of range.
12221222

12231223
<dt>''number''
1224-
<dd>The attribute value will be interpreted as a CSS <var>&lt;number></var>.
1224+
<dd>The attribute value will be parsed as a CSS <var>&lt;number></var>.
12251225
The default is ''0.0'', or else the property's minimum value if ''0.0'' is not valid for the property. The default should also be used if the
12261226
property in question only accepts numbers within a certain
12271227
range and the attribute is out of range.
@@ -1230,7 +1230,7 @@ <h3 id="attr-notation">
12301230
<dt>''angle''
12311231
<dt>''time''
12321232
<dt>''frequency''
1233-
<dd>The attribute value will be interpreted as a CSS <var>&lt;length></var>,
1233+
<dd>The attribute value will be parsed as a CSS <var>&lt;length></var>,
12341234
<var>&lt;angle></var>, <var>&lt;time></var> or <var>&lt;frequency></var> (respectively), and
12351235
the unit identifier (if any) will appear in the attribute value.
12361236
The default is ''0'' in the relevant units, or else the property's minimum value if ''0'' in the relevant units is not valid for the property. The default should also be
@@ -1259,8 +1259,8 @@ <h3 id="attr-notation">
12591259
<dt>''Hz''
12601260
<dt>''kHz''
12611261
<dt>''%''
1262-
<dd>The attribute value will be interpreted as a CSS ''NUMBER'' token, with the given
1263-
type suffixed as a unit, to create a dimension with the given unit's type. The default is ''0'' in the relevant
1262+
<dd>The attribute value will be parsed as a CSS <var>&lt;number></var>, with the given
1263+
type suffixed as a unit to create a dimension with the given unit's type. The default is ''0'' in the relevant
12641264
units, or else the property's minimum value if ''0'' in the relevant units is not valid for the property.
12651265
If the unit is a relative length, it must be computed to an absolute length.
12661266
</dl>

0 commit comments

Comments
 (0)