8000 Markup tweak. · xfq/csswg-drafts@5b53ffa · GitHub
Skip to content

Commit 5b53ffa

Browse files
committed
Markup tweak.
1 parent f2e4e52 commit 5b53ffa

2 files changed

Lines changed: 83 additions & 96 deletions

File tree

css3-values/Overview.html

Lines changed: 61 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#propvalues td + td { text-align: left; }
1515
dt + dt::before { content: ", "; }
1616
dt { display: inline; }
17+
:not(code) var { font-style: normal; color: #005A9C; }
1718
</style>
1819
<link href="../default.css" rel=stylesheet type="text/css">
1920
<link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet
@@ -261,10 +262,9 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
261262
class=css>kHz</code>&rsquo; units</a>
262263

263264
<li><a href="#resolution"><span class=secno>6.4. </span> Resolutions:
264-
the &lsquo;<code class=css>&lt;resolution></code>&rsquo; type and
265-
&lsquo;<code class=css>dpi</code>&rsquo;, &lsquo;<code
266-
class=css>dpcm</code>&rsquo;, &lsquo;<code class=css>dppx</code>&rsquo;
267-
units</a>
265+
the <var>&lt;resolution></var> type and &lsquo;<code
266+
class=css>dpi</code>&rsquo;, &lsquo;<code class=css>dpcm</code>&rsquo;,
267+
&lsquo;<code class=css>dppx</code>&rsquo; units</a>
268268
</ul>
269269

270270
<li><a href="#defined-elsewhere"><span class=secno>7. </span> Data Types
@@ -1215,10 +1215,10 @@ <h3 id=frequency><span class=secno>6.3. </span> Frequencies: the &lsquo;<a
12151215
<p>For example, when representing sound pitches, 200Hz (or 200hz) is a bass
12161216
sound, and 6kHz (or 6khz) is a treble sound.
12171217

1218-
<h3 id=resolution><span class=secno>6.4. </span> Resolutions: the &lsquo;<a
1219-
href="#resolution-value"><code class=css>&lt;resolution></code></a>&rsquo;
1220-
type and &lsquo;<a href="#dpi"><code class=css>dpi</code></a>&rsquo;,
1221-
&lsquo;<a href="#dpcm"><code class=css>dpcm</code></a>&rsquo;, &lsquo;<a
1218+
<h3 id=resolution><span class=secno>6.4. </span> Resolutions: the <a
1219+
href="#resolution-value"><var>&lt;resolution></var></a> type and &lsquo;<a
1220+
href="#dpi"><code class=css>dpi</code></a>&rsquo;, &lsquo;<a
1221+
href="#dpcm"><code class=css>dpcm</code></a>&rsquo;, &lsquo;<a
12221222
href="#dppx"><code class=css>dppx</code></a>&rsquo; units</h3>
12231223

12241224
<p>Resolution units are <a href="#dimension"><i>dimensions</i></a> denoted
@@ -1239,11 +1239,11 @@ <h3 id=resolution><span class=secno>6.4. </span> Resolutions: the &lsquo;<a
12391239
<dd>dots per &lsquo;<code class=css>px</code>&rsquo; unit
12401240
</dl>
12411241

1242-
<p>The &lsquo;<a href="#resolution-value"><code
1243-
class=css>&lt;resolution></code></a>&rsquo; unit represents the size of a
1244-
single "dot" in a graphical representation by indicating how many of these
1245-
dots fit in a CSS &lsquo;<code class=property>in</code>&rsquo;,
1246-
&lsquo;<code class=property>cm</code>&rsquo;, or &lsquo;<code
1242+
<p>The <a href="#resolution-value"><var>&lt;resolution></var></a> unit
1243+
represents the size of a single "dot" in a graphical representation by
1244+
indicating how many of these dots fit in a CSS &lsquo;<code
1245+
class=property>in</code>&rsquo;, &lsquo;<code
1246+
class=property>cm</code>&rsquo;, or &lsquo;<code
12471247
class=property>px</code>&rsquo;. For uses, see e.g. the &lsquo;<code
12481248
class=css>resolution</code>&rsquo; media query in <a href="#MEDIAQ"
12491249
rel=biblioentry>[MEDIAQ]<!--{{MEDIAQ}}--></a> or the &lsquo;<code
@@ -1470,25 +1470,20 @@ <h4 id=calc-syntax><span class=secno>8.1.1. </span> Syntax</h4>
14701470
<h4 id=calc-type-checking><span class=secno>8.1.2. </span> Type Checking</h4>
14711471

14721472
<p>A math expression has a <dfn id=resolved-type>resolved type</dfn>, which
1473-
is one of &lsquo;<code class=css>&lt;length></code>&rsquo;, &lsquo;<code
1474-
class=css>&lt;frequency></code>&rsquo;, &lsquo;<code
1475-
class=css>&lt;angle></code>&rsquo;, &lsquo;<code
1476-
class=css>&lt;time></code>&rsquo;, or &lsquo;<code
1477-
class=css>&lt;number></code>&rsquo;. The <a
1478-
href="#resolved-type"><i>resolved type</i></a> must be valid for where the
1479-
expression is placed; otherwise, the expression is invalid. The <a
1480-
href="#resolved-type"><i>resolved type</i></a> of the expression is
1473+
is one of <var>&lt;length></var>, <var>&lt;frequency></var>,
1474+
<var>&lt;angle></var>, <var>&lt;time></var>, or <var>&lt;number></var>.
1475+
The <a href="#resolved-type"><i>resolved type</i></a> must be valid for
1476+
where the expression is placed; otherwise, the expression is invalid. The
1477+
<a href="#resolved-type"><i>resolved type</i></a> of the expression is
14811478
determined by the types of the values it contains. <a
1482-
href="#number"><code>NUMBER</code></a> tokens are of type &lsquo;<code
1483-
class=css>&lt;number></code>&rsquo;. A <a
1484-
href="#dimension"><code>DIMENSION</code></a> token's type is given by its
1485-
unit (&lsquo;<code class=css>cm</code>&rsquo; is &lsquo;<code
1486-
class=css>&lt;length></code>&rsquo;, &lsquo;<a href="#deg"><code
1487-
class=css>deg</code></a>&rsquo; is &lsquo;<code
1488-
class=css>&lt;angle></code>&rsquo;, etc.). If percentages are accepted in
1489-
the context in which the expression is placed, a <a
1490-
href="#percentage"><code>PERCENTAGE</code></a> token has the type of the
1491-
value that percentages are relative to; otherwise, a math expression
1479+
href="#number"><code>NUMBER</code></a> tokens are of type
1480+
<var>&lt;number></var>. A <a href="#dimension"><code>DIMENSION</code></a>
1481+
token's type is given by its unit (&lsquo;<code class=css>cm</code>&rsquo;
1482+
is <var>&lt;length></var>, &lsquo;<a href="#deg"><code
1483+
class=css>deg</code></a>&rsquo; is <var>&lt;angle></var>, etc.). If
1484+
percentages are accepted in the context in which the expression is placed,
1485+
a <a href="#percentage"><code>PERCENTAGE</code></a> token has the type of
1486+
the value that percentages are relative to; otherwise, a math expression
14921487
containing percentages is invalid.
14931488

14941489
<p>Operators form sub-expressions, which gain types based on their
@@ -1504,12 +1499,10 @@ <h4 id=calc-type-checking><span class=secno>8.1.2. </span> Type Checking</h4>
15041499
check that both sides have the same type; resolve to that type.
15051500

15061501
<li>At &lsquo;<code class=css>*</code>&rsquo;, check that at least one
1507-
side is &lsquo;<code class=css>&lt;number></code>&am 6D50 p;rsquo;; resolve to the
1508-
type of the other side
1502+
side is <var>&lt;number></var>; resolve to the type of the other side
15091503

15101504
<li>At &lsquo;<code class=css>/</code>&rsquo;, check that the right side
1511-
is &lsquo;<code class=css>&lt;number></code>&rsquo;; resolve to the type
1512-
of the left side.
1505+
is <var>&lt;number></var>; resolve to the type of the left side.
15131506
</ul>
15141507

15151508
<p>If an operator does not pass the above checks, the expression is
@@ -1636,34 +1629,31 @@ <h3 id=attr-notation><span class=secno>8.3. </span> Attribute References:
16361629
represents an attribute name. <span class=note>Most of the time, this will
16371630
just be an identifier.</span>
16381631

1639-
<p> The optional &lsquo;<code class=css>&lt;type-or-unit></code>&rsquo;
1640-
argument is a keyword drawn from the list below that tells the UA how to
1641-
interpret the attribute value, and defines a type for the attr()
1642-
expression. If omitted, &lsquo;<code class=css>string</code>&rsquo; is
1643-
implied.
1632+
<p> The optional <var>&lt;type-or-unit></var> argument is a keyword drawn
1633+
from the list below that tells the UA how to interpret the attribute
1634+
value, and defines a type for the attr() expression. If omitted,
1635+
&lsquo;<code class=css>string</code>&rsquo; is implied.
16441636

1645-
<p> The optional &lsquo;<code class=css>&lt;fallback></code>&rsquo;
1646-
argument represents a fallback value, which is used if the named attribute
1647-
is missing, or its value cannot be parsed into the given type or is
1648-
invalid/out-of-range for the property. If it's absent, the default value
1649-
for the given &lsquo;<code class=css>&lt;type-or-unit></code>&rsquo; (from
1650-
the list below) is implied.
1637+
<p> The optional <var>&lt;fallback></var> argument represents a fallback
1638+
value, which is used if the named attribute is missing, or its value
1639+
cannot be parsed into the given type or is invalid/out-of-range for the
1640+
property. If it's absent, the default value for the given
1641+
<var>&lt;type-or-unit></var> (from the list below) is implied.
16511642

16521643
<p> The attr() expression is only valid if:
16531644

16541645
<ul>
16551646
<li> the attr() expression's type is valid where the attr() expression is
16561647
placed,
16571648

1658-
<li> the &lsquo;<code class=css>&lt;fallback></code>&rsquo; is valid where
1659-
the attr() expression is placed,
1649+
<li> the <var>&lt;fallback></var> is valid where the attr() expression is
1650+
placed,
16601651

1661-
<li> the &lsquo;<code class=css>&lt;fallback></code>&rsquo; does not
1662-
contain another attr() expression,
1652+
<li> the <var>&lt;fallback></var> does not contain another attr()
1653+
expression,
16631654

16641655
<li> and, if the attr() expression is not the sole component value of a
1665-
property, the &lsquo;<code class=css>&lt;fallback></code>&rsquo; matches
1666-
the attr()&apos;s type
1656+
property, the <var>&lt;fallback></var> matches the attr()&apos;s type
16671657
</ul>
16681658

16691659
<div class=note>
@@ -1683,20 +1673,18 @@ <h3 id=attr-notation><span class=secno>8.3. </span> Attribute References:
16831673
&lsquo;<code class=css>inset</code>&rsquo; keyword.
16841674
</div>
16851675

1686-
<p>The &lsquo;<code class=css>&lt;type-or-unit></code>&rsquo; keywords are:
1676+
<p>The <var>&lt;type-or-unit></var> keywords are:
16871677

16881678
<dl>
16891679
<dt>&lsquo;<code class=css>string</code>&rsquo;
16901680

16911681
<dd>The attribute value will be interpreted as the contents of a CSS
1692-
&lsquo;<code class=css>&lt;string></code>&rsquo;. The default is the
1693-
empty string.
1682+
<var>&lt;string></var>. The default is the empty string.
16941683

16951684
<dt>&lsquo;<code class=css>color</code>&rsquo;
16961685

1697-
<dd>The attribute value will be interpreted as a CSS &lsquo;<code
1698-
class=css>&lt;color></code>&rsquo; value. The default is &lsquo;<code
1699-
class=css>currentColor</code>&rsquo;.
1686+
<dd>The attribute value will be interpreted as a CSS <var>&lt;color></var>
1687+
value. The default is &lsquo;<code class=css>currentColor</code>&rsquo;.
17001688

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

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

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

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

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

1723-
<dd>The attribute value will be interpreted as a CSS &lsquo;<code
1724-
class=css>&lt;number></code>&rsquo;. The default is &lsquo;<code
1711+
<dd>The attribute value will be interpreted as a CSS
1712+
<var>&lt;number></var>. The default is &lsquo;<code
17251713
class=css>0.0</code>&rsquo;, or else the property's minimum value if
17261714
&lsquo;<code class=css>0.0</code>&rsquo; is not valid for the property.
17271715
The default should also be used if the property in question only accepts
@@ -1735,19 +1723,17 @@ <h3 id=attr-notation><span class=secno>8.3. </span> Attribute References:
17351723

17361724
<dt>&lsquo;<code class=css>frequency</code>&rsquo;
17371725

1738-
<dd>The attribute value will be interpreted as a CSS &lsquo;<code
1739-
class=css>&lt;length></code>&rsquo;, &lsquo;<code
1740-
class=css>&lt;angle></code>&rsquo;, &lsquo;<code
1741-
class=css>&lt;time></code>&rsquo; or &lsquo;<code
1742-
class=css>&lt;frequency></code>&rsquo; (respectively), and the unit
1743-
identifier (if any) will appear in the attribute value. The default is
1744-
&lsquo;<code class=css>0</code>&rsquo; in the relevant units, or else the
1745-
property's minimum value if &lsquo;<code class=css>0</code>&rsquo; in the
1746-
relevant units is not valid for the property. The default should also be
1747-
used if the property in question only accepts values within a certain
1748-
range (e.g. positive lengths or angles from 0 to 90deg) and the attribute
1749-
is out of range (e.g. a negative length or 180deg). If the unit is a
1750-
relative length, it must be computed to an absolute length.
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.
17511737

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

css3-values/Overview.src.html

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#propvalues td + td { text-align: left; }
1414
dt + dt::before { content: ", "; }
1515
dt { display: inline; }
16+
:not(code) var { font-style: normal; color: #005A9C; }
1617
</style>
1718
<link rel="stylesheet" type="text/css" href="../default.css">
1819
<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS].css">
@@ -785,7 +786,7 @@ <h3 id="frequency">
785786
is a bass sound, and 6kHz (or 6khz) is a treble sound.</p>
786787

787788
<h3 id="resolution">
788-
Resolutions: the ''&lt;resolution>'' type and ''dpi'', ''dpcm'', ''dppx'' units</h3>
789+
Resolutions: the <var>&lt;resolution></var> type and ''dpi'', ''dpcm'', ''dppx'' units</h3>
789790

790791
<p>Resolution units are <i>dimensions</i> denoted by <dfn id="resolution-value">&lt;resolution></dfn>. The frequency unit identifiers are:</p>
791792

@@ -800,7 +801,7 @@ <h3 id="resolution">
800801
<dd>dots per ''px'' unit</dd>
801802
</dl>
802803

803-
<p>The ''&lt;resolution>'' unit represents the size of a single "dot" in a
804+
<p>The <var>&lt;resolution></var> unit represents the size of a single "dot" in a
804805
graphical representation by indicating how many of these dots fit in a
805806
CSS 'in', 'cm', or 'px'.
806807
For uses, see e.g. the ''resolution'' media query in [[MEDIAQ]]
@@ -1005,13 +1006,13 @@ <h4 id='calc-type-checking'>
10051006
Type Checking</h4>
10061007

10071008
<p>A math expression has a <dfn>resolved type</dfn>, which is one of
1008-
''&lt;length>'', ''&lt;frequency>'', ''&lt;angle>'', ''&lt;time>'', or
1009-
''&lt;number>''. The <i>resolved type</i> must be valid for where the
1009+
<var>&lt;length></var>, <var>&lt;frequency></var>, <var>&lt;angle></var>, <var>&lt;time></var>, or
1010+
<var>&lt;number></var>. The <i>resolved type</i> must be valid for where the
10101011
expression is placed; otherwise, the expression is invalid.
10111012
The <i>resolved type</i> of the expression is determined by the
10121013
types of the values it contains. <code>NUMBER</code> tokens
1013-
are of type ''&lt;number>''. A <code>DIMENSION</code> token's type is given
1014-
by its unit (''cm'' is ''&lt;length>'', ''deg'' is ''&lt;angle>'', etc.).
1014+
are of type <var>&lt;number></var>. A <code>DIMENSION</code> token's type is given
1015+
by its unit (''cm'' is <var>&lt;length></var>, ''deg'' is <var>&lt;angle></var>, etc.).
10151016
If percentages are accepted in the context in which the expression
10161017
is placed, a <code>PERCENTAGE</code> token has the type of the value that
10171018
percentages are relative to; otherwise, a math expression containing
@@ -1028,10 +1029,10 @@ <h4 id='calc-type-checking'>
10281029
<li>At '','', ''+'', or ''-'', check that both sides have the same type;
10291030
resolve to that type.</li>
10301031

1031-
<li>At ''*'', check that at least one side is ''&lt;number>'';
1032+
<li>At ''*'', check that at least one side is <var>&lt;number></var>;
10321033
resolve to the type of the other side</li>
10331034

1034-
<li>At ''/'', check that the right side is ''&lt;number>'';
1035+
<li>At ''/'', check that the right side is <var>&lt;number></var>;
10351036
resolve to the type of the left side.</li>
10361037
</ul>
10371038

@@ -1145,16 +1146,16 @@ <h3 id="attr-notation">
11451146
<span class='note'>Most of the time, this will just be an identifier.</span>
11461147

11471148
<p>
1148-
The optional ''&lt;type-or-unit>'' argument is a keyword drawn from the list below that tells the UA how to interpret the attribute value,
1149+
The optional <var>&lt;type-or-unit></var> argument is a keyword drawn from the list below that tells the UA how to interpret the attribute value,
11491150
and defines a type for the attr() expression.
11501151
If omitted, ''string'' is implied.
11511152

11521153
<p>
1153-
The optional ''&lt;fallback>'' argument represents a fallback value,
1154+
The optional <var>&lt;fallback></var> argument represents a fallback value,
11541155
which is used if the named attribute is missing,
11551156
or its value cannot be parsed into the given type or is invalid/out-of-range for the property.
11561157
If it's absent,
1157-
the default value for the given ''&lt;type-or-unit>'' (from the list below) is implied.
1158+
the default value for the given <var>&lt;type-or-unit></var> (from the list below) is implied.
11581159

11591160
<p>
11601161
The attr() expression is only valid if:
@@ -1164,14 +1165,14 @@ <h3 id="attr-notation">
11641165
the attr() expression's type is valid where the attr() expression is placed,
11651166

11661167
<li>
1167-
the ''&lt;fallback>'' is valid where the attr() expression is placed,
1168+
the <var>&lt;fallback></var> is valid where the attr() expression is placed,
11681169

11691170
<li>
1170-
the ''&lt;fallback>'' does not contain another attr() expression,
1171+
the <var>&lt;fallback></var> does not contain another attr() expression,
11711172

11721173
<li>
11731174
and, if the attr() expression is not the sole component value of a property,
1174-
the ''&lt;fallback>'' matches the attr()&apos;s type
1175+
the <var>&lt;fallback></var> matches the attr()&apos;s type
11751176
</ul>
11761177

11771178
<div class='note'>
@@ -1192,15 +1193,15 @@ <h3 id="attr-notation">
11921193

11931194

11941195

1195-
<p>The ''&lt;type-or-unit>'' keywords are:</p>
1196+
<p>The <var>&lt;type-or-unit></var> keywords are:</p>
11961197

11971198
<dl>
11981199
<dt>''string''
11991200
<dd>The attribute value will be interpreted as the contents of a CSS
1200-
''&lt;string>''. The default is the empty string.
1201+
<var>&lt;string></var>. The default is the empty string.
12011202

12021203
<dt>''color''
1203-
<dd>The attribute value will be interpreted as a CSS ''&lt;color>'' value.
1204+
<dd>The attribute value will be interpreted as a CSS <var>&lt;color></var> value.
12041205
The default is ''currentColor''.
12051206

12061207
<dt>''url''
@@ -1214,13 +1215,13 @@ <h3 id="attr-notation">
12141215
originating from the element; they are not relative to the style sheet.
12151216

12161217
<dt>''integer''
1217-
<dd>The attribute value will be interpreted as a CSS ''&a 2DD0 mp;lt;integer>''.
1218+
<dd>The attribute value will be interpreted as a CSS <var>&lt;integer></var>.
12181219
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
12191220
in question only accepts integers within a certain range and
12201221
the attribute is out of range.
12211222

12221223
<dt>''number''
1223-
<dd>The attribute value will be interpreted as a CSS ''&lt;number>''.
1224+
<dd>The attribute v 52BE alue will be interpreted as a CSS <var>&lt;number></var>.
12241225
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
12251226
property in question only accepts numbers within a certain
12261227
range and the attribute is out of range.
@@ -1229,8 +1230,8 @@ <h3 id="attr-notation">
12291230
<dt>''angle''
12301231
<dt>''time''
12311232
<dt>''frequency''
1232-
<dd>The attribute value will be interpreted as a CSS ''&lt;length>'',
1233-
''&lt;angle>'', ''&lt;time>'' or ''&lt;frequency>'' (respectively), and
1233+
<dd>The attribute value will be interpreted as a CSS <var>&lt;length></var>,
1234+
<var>&lt;angle></var>, <var>&lt;time></var> or <var>&lt;frequency></var> (respectively), and
12341235
the unit identifier (if any) will appear in the attribute value.
12351236
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
12361237
used if the property in question only accepts values within a certain

0 commit comments

Comments
 (0)