Skip to content

Commit 7d0b793

Browse files
committed
Make the default for attr() use the min value for the prop if 0 isn't valid.
1 parent bbd1932 commit 7d0b793

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

css3-values/Overview.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,17 +1522,19 @@ <h3 id=attr><span class=secno>8.3. </span> Attribute References: &lsquo;<a
15221522

15231523
<dd>The attribute value will be interpreted as a CSS &lsquo;<code
15241524
class=css>&lt;integer></code>&rsquo;. The default is &lsquo;<code
1525-
class=css>0</code>&rsquo;. The default should also be used if the
1526-
property in question only accepts integers within a certain range and the
1527-
attribute is out of range.
1525+
class=css>0</code>&rsquo;, or else the property's minimum value is
1526+
&lsquo;<code class=css>0</code>&rsquo; is not valid for the property. The
1527+
default should also be used if the property in question only accepts
1528+
integers within a certain range and the attribute is out of range.
15281529

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

15311532
<dd>The attribute value will be interpreted as a CSS &lsquo;<code
15321533
class=css>&lt;number></code>&rsquo;. The default is &lsquo;<code
1533-
class=css>0.0</code>&rsquo;. The default should also be used if the
1534-
property in question only accepts numbers within a certain range and the
1535-
attribute is out of range.
1534+
class=css>0.0</code>&rsquo;, or else the property's minimum value is
1535+
&lsquo;<code class=css>0.0</code>&rsquo; is not valid for the property.
1536+
The default should also be used if the property in question only accepts
1537+
numbers within a certain range and the attribute is out of range.
15361538

15371539
<dt>&lsquo;<code class=css>length</code>&rsquo;
15381540

css3-values/Overview.src.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,13 +1079,13 @@ <h3 id="attr">
10791079

10801080
<dt>''integer''
10811081
<dd>The attribute value will be interpreted as a CSS ''&lt;integer>''.
1082-
The default is ''0''. The default should also be used if the property
1082+
The default is ''0'', or else the property's minimum value is ''0'' is not valid for the property. The default should also be used if the property
10831083
in question only accepts integers within a certain range and
10841084
the attribute is out of range.
10851085

10861086
<dt>''number''
10871087
<dd>The attribute value will be interpreted as a CSS ''&lt;number>''.
1088-
The default is ''0.0''. The default should also be used if the
1088+
The default is ''0.0'', or else the property's minimum value is ''0.0'' is not valid for the property. The default should also be used if the
10891089
property in question only accepts numbers within a certain
10901090
range and the attribute is out of range.
10911091

0 commit comments

Comments
 (0)