Skip to content

Commit 2347190

Browse files
committed
1 parent 1ba86c7 commit 2347190

2 files changed

Lines changed: 30 additions & 49 deletions

File tree

css3-values/Overview.html

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,33 +1570,24 @@ <h3 id=attr><span class=secno>8.3. </span> Attribute References: &lsquo;<a
15701570
class=css>attr()</code></a>&rsquo; expression is:
15711571

15721572
<pre>'attr(' <a
1573-
href="#wqname"><var>wqname</var></a> [ ',' &lt;type> [ ',' &lt;value> ]? ]? ')'</pre>
1573+
href="#wqname"><var>wqname</var></a> &lt;type>? [ ',' &lt;value> ]? ')'</pre>
15741574

15751575
<p>where <dfn id=wqname>wqname</dfn> is a <a
15761576
href="http://dev.w3.org/csswg/css3-namespace/#css-qnames">CSS qualified
1577-
name</a> [[!CSSNAMESPACE]] and whose syntax is defined as:
1578-
1579-
<pre>
1580-
wqname
1581-
: [ [ namespace_prefix? | '*' ] '|' ident ]
1582-
| ident
1583-
;</pre>
1584-
<!-- TODO: Delete this syntax definition when Namespaces is updated to contain the wqname production -->
1585-
1586-
<p>The <a href="#wqname"><i>wqname</i></a> argument represents an attribute
1587-
name. The computed value of the &lsquo;<a href="#attr-value"><code
1577+
name</a> [[!CSSNAMESPACE]] that represents an attribute name. The computed
1578+
value of the &lsquo;<a href="#attr-value"><code
15881579
class=css>attr()</code></a>&rsquo; expression is the value of the
15891580
attribute with that name on the element, according to the rules given
15901581
below.
15911582

15921583
<p>The &lsquo;<code class=css>&lt;type></code>&rsquo; argument (which is
1593-
optional but must be present if the third argument is present) is a
1594-
keyword drawn from the list below that tells the UA how to interpret the
1595-
attribute value. If omitted, &lsquo;<code class=css>string</code>&rsquo;
1596-
is implied. If the type is not valid for where the &lsquo;<a
1597-
href="#attr-value"><code class=css>attr()</code></a>&rsquo; expression is
1598-
placed, the whole &lsquo;<a href="#attr-value"><code
1599-
class=css>attr()</code></a>&rsquo; expression is invalid.
1584+
optional) is a keyword drawn from the list below that tells the UA how to
1585+
interpret the attribute value. If omitted, &lsquo;<code
1586+
class=css>string</code>&rsquo; is implied. If the type is not valid for
1587+
where the &lsquo;<a href="#attr-value"><code
1588+
class=css>attr()</code></a>&rsquo; expression is placed, the whole
1589+
&lsquo;<a href="#attr-value"><code class=css>attr()</code></a>&rsquo;
1590+
expression is invalid.
16001591

16011592
<p>The &lsquo;<code class=css>&lt;value></code>&rsquo; argument (which is
16021593
optional) is a CSS value which must be valid where the &lsquo;<a
@@ -1751,7 +1742,7 @@ <h3 id=attr><span class=secno>8.3. </span> Attribute References: &lsquo;<a
17511742
}
17521743
stock > * {
17531744
display: block;
1754-
width: attr(length, em); /* default 0 */
1745+
width: attr(length em); /* default 0 */
17551746
height: 1em;
17561747
border: solid thin;
17571748
margin: 0.5em;
@@ -1767,9 +1758,9 @@ <h3 id=attr><span class=secno>8.3. </span> Attribute References: &lsquo;<a
17671758
to handle replaced content and alternatives to unavailable,
17681759
corrupted or unsupported content */
17691760
img {
1770-
content: replaced attr(src, url), attr(alt, string, none);
1771-
height: attr(height, px, auto);
1772-
width: attr(width, px, auto);
1761+
content: replaced attr(src url), attr(alt string, none);
1762+
height: attr(height px, auto);
1763+
width: attr(width px, auto);
17731764
}</pre>
17741765
</div>
17751766

@@ -1779,13 +1770,13 @@ <h3 id=attr><span class=secno>8.3. </span> Attribute References: &lsquo;<a
17791770
them&mdash;to be ignored:</p>
17801771

17811772
<pre>
1782-
content: attr(title, color); /* 'content' doesn't accept colors */
1773+
content: attr(title color); /* 'content' doesn't accept colors */
17831774

1784-
content: attr(end-of-quote, string, inherit) close-quote;
1775+
content: attr(end-of-quote string, inherit) close-quote;
17851776
/* the 'inherit' value is not allowed there, since the result would be
17861777
'inherit close-quote', which is invalid. */
17871778

1788-
margin: attr(vertical, length) attr(horizontal, deg);
1779+
margin: attr(vertical length) attr(horizontal deg);
17891780
/* deg units are not valid at that point */
17901781
<!--
17911782
font: attr(weight, integer) attr(size, length)/attr(height,

css3-values/Overview.src.html

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,28 +1088,18 @@ <h3 id="attr">
10881088

10891089
<p>The new syntax for the ''attr()'' expression is:</p>
10901090

1091-
<pre>'attr(' <var>wqname</var> [ ',' &lt;type> [ ',' &lt;value> ]? ]? ')'</pre>
1091+
<pre>'attr(' <var>wqname</var> &lt;type>? [ ',' &lt;value> ]? ')'</pre>
10921092

10931093
<p>where <dfn>wqname</dfn> is a
10941094
<a href="http://dev.w3.org/csswg/css3-namespace/#css-qnames">CSS qualified name</a>
1095-
[[!CSSNAMESPACE]] and whose syntax is defined as:</p>
1096-
1097-
<pre>
1098-
wqname
1099-
: [ [ namespace_prefix? | '*' ] '|' ident ]
1100-
| ident
1101-
;</pre>
1102-
<!-- TODO: Delete this syntax definition when Namespaces is updated to contain the wqname production -->
1103-
1104-
<p>The <i>wqname</i> argument represents an attribute name. The computed
1095+
[[!CSSNAMESPACE]] that represents an attribute name. The computed
11051096
value of the ''attr()'' expression is the value of the attribute with that
11061097
name on the element, according to the rules given below.</p>
11071098

1108-
<p>The ''&lt;type>'' argument (which is optional but must be present if the
1109-
third argument is present) is a keyword drawn from the list below that tells
1110-
the UA how to interpret the attribute value. If omitted, ''string'' is
1111-
implied. If the type is not valid for where the ''attr()'' expression is
1112-
placed, the whole ''attr()'' expression is invalid.</p>
1099+
<p>The ''&lt;type>'' argument (which is optional) is a keyword drawn from
1100+
the list below that tells the UA how to interpret the attribute value.
1101+
If omitted, ''string'' is implied. If the type is not valid for where the
1102+
''attr()'' expression is placed, the whole ''attr()'' expression is invalid.</p>
11131103

11141104
<p>The ''&lt;value>'' argument (which is optional) is a CSS value which must
11151105
be valid where the ''attr()'' expression is placed. It represents a fallback
@@ -1213,7 +1203,7 @@ <h3 id="attr">
12131203
}
12141204
stock > * {
12151205
display: block;
1216-
width: attr(length, em); /* default 0 */
1206+
width: attr(length em); /* default 0 */
12171207
height: 1em;
12181208
border: solid thin;
12191209
margin: 0.5em;
@@ -1229,9 +1219,9 @@ <h3 id="attr">
12291219
to handle replaced content and alternatives to unavailable,
12301220
corrupted or unsupported content */
12311221
img {
1232-
content: replaced attr(src, url), attr(alt, string, none);
1233-
height: attr(height, px, auto);
1234-
width: attr(width, px, auto);
1222+
content: replaced attr(src url), attr(alt string, none);
1223+
height: attr(height px, auto);
1224+
width: attr(width px, auto);
12351225
}</pre>
12361226
</div>
12371227

@@ -1241,13 +1231,13 @@ <h3 id="attr">
12411231
this case all of them&mdash;to be ignored:</p>
12421232

12431233
<pre>
1244-
content: attr(title, color); /* 'content' doesn't accept colors */
1234+
content: attr(title color); /* 'content' doesn't accept colors */
12451235

1246-
content: attr(end-of-quote, string, inherit) close-quote;
1236+
content: attr(end-of-quote string, inherit) close-quote;
12471237
/* the 'inherit' value is not allowed there, since the result would be
12481238
'inherit close-quote', which is invalid. */
12491239

1250-
margin: attr(vertical, length) attr(horizontal, deg);
1240+
margin: attr(vertical length) attr(horizontal deg);
12511241
/* deg units are not valid at that point */
12521242
<!--
12531243
font: attr(weight, integer) attr(size, length)/attr(height,

0 commit comments

Comments
 (0)