Skip to content

Commit f5210a3

Browse files
committed
[css-values] Fix editorial nits reported by timeless (issues-cr-2015#4) <https://lists.w3.org/Archives/Public/www-style/2015Jul/0050.html>
1 parent 6fce0ff commit f5210a3

1 file changed

Lines changed: 44 additions & 38 deletions

File tree

css-values/Overview.bs

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Component value types</h3>
116116
such as “+”,
117117
must be written enclosed in single quotes.
118118

119-
<dfn lt="," id='comb-comma' export grammar>Commas</dfn> specified in the grammar are <strong>implicitly omittable</strong> in some circumstances,
119+
<strong><dfn lt="," id='comb-comma' export grammar>Commas</dfn> specified in the grammar are implicitly omissible</strong> in some circumstances,
120120
when used to separate optional terms in the grammar.
121121
Within a top-level list in a property or other CSS value,
122122
or a function's argument list,
@@ -130,7 +130,7 @@ Component value types</h3>
130130
all items following the comma have been omitted
131131

132132
<li>
133-
multiple commas would be adjacent (ignoring whitespace/comments),
133+
multiple commas would be adjacent (ignoring <a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a>/comments),
134134
due to the items between the commas being omitted.
135135
</ul>
136136

@@ -196,7 +196,7 @@ Component value combinators</h3>
196196
[ a b ] | [ c || [ d && [ e f ]]]
197197
</pre>
198198

199-
For re-orderable combinators (||, &&),
199+
For reorderable combinators (||, &&),
200200
ordering of the grammar does not matter:
201201
components in the same grouping may be interleaved in any order.
202202
Thus, the following lines are equivalent:
@@ -234,7 +234,7 @@ Component value multipliers</h3>
234234

235235
<li>A hash mark (<dfn id='mult-comma'>#</dfn>) indicates that the preceding type, word, or
236236
group occurs one or more times, separated by comma tokens
237-
(which may optionally be surrounded by white space and/or comments).
237+
(which may optionally be surrounded by <a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a> and/or comments).
238238
It may optionally be followed by the curly brace forms, above,
239239
to indicate precisely how many times the repetition occurs,
240240
like ''&lt;length>#{1,4}''.
@@ -291,7 +291,7 @@ Combinator and Multiplier Patterns</h3>
291291
Component values and white space</h3>
292292

293293
Unless otherwise specified,
294-
white space and/or comments may appear before, after, and/or between
294+
<a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a> and/or comments may appear before, after, and/or between
295295
components combined using the above
296296
<a href="#component-combinators">combinators</a> and
297297
<a href="#component-multipliers">multipliers</a>.
@@ -302,7 +302,7 @@ Component values and white space</h3>
302302
with the number ''1'' and the identifier ''em2em'',
303303
which is an invalid unit.
304304
In this case, a space would be required before the ''2''
305-
to get this parsed as the two lengths ''1em''and ''2em''.
305+
to get this parsed as the two lengths ''1em'' and ''2em''.
306306

307307
<h3 id="value-examples">
308308
Property value examples</h3>
@@ -351,7 +351,7 @@ Textual Data Types</h2>
351351

352352
An <dfn>identifier</dfn> is a sequence of characters conforming to the <<ident-token>> grammar. [[!CSS3SYN]]
353353
Identifiers cannot be quoted;
354-
otherwise they would be interpreted as a string.
354+
otherwise they would be interpreted as strings.
355355

356356
<!--
357357
██ ██ ████████ ██ ██ ██ ██ ███████ ████████ ████████ ██████
@@ -370,7 +370,7 @@ Pre-defined Keywords</h3>
370370
keywords with a pre-defined meaning appear literally.
371371
Keywords are CSS <a>identifiers</a>
372372
and are interpreted <a lt="ASCII case-insensitive">ASCII case-insensitively</a>
373-
(i.e., \[a-z] and \[A-Z] are equivalent).
373+
(i.e., [a-z] and \[A-Z] are equivalent).
374374

375375
<div class="example">
376376
For example, here is the value definition for the 'border-collapse'
@@ -526,8 +526,9 @@ Resource Locators: the <<url>> type</h3>
526526
Because these alternate ways of writing a <<url>> are not <a>functional notations</a>,
527527
they cannot accept any <<url-modifier>>s.
528528

529-
Note: The special parsing rules for the legacy quotation mark-less <<url>> syntax
530-
means that parentheses, whitespace characters, single quotes (&#39;) and double quotes (") appearing in a URL
529+
Note: The special parsing rules for the legacy quotation-mark&ndash;less <<url>> syntax
530+
means that parentheses, <a href="https://www.w3.org/TR/css-syntax/#whitespace">whitespace</a> characters,
531+
single quotes (&#39;) and double quotes (") appearing in a URL
531532
must be escaped with a backslash,
532533
e.g. ''url(open\(parens)'', ''url(close\)parens)''.
533534
Depending on the type of URL,
@@ -781,7 +782,7 @@ Relative lengths</h3>
781782
<tr><td>''vw''
782783
<td>1% of viewport's width
783784
<tr><td>''vh''
784-
<td>1% viewport's height
785+
<td>1% of viewport's height
785786
<tr><td>''vmin''
786787
<td>1% of viewport's smaller dimension
787788
<tr><td>''vmax''
@@ -834,7 +835,7 @@ Font-relative lengths: the ''em'', ''ex'', ''ch'', ''rem'' units</h4>
834835

835836
<dt><dfn lt="ex">ex unit</dfn>
836837
<dd>
837-
Equal to the used x-height of the <a href="https://www.w3.org/TR/css3-fonts/#first-available-font">first available font</a>. [[!CSS3-FONTS]]
838+
Equal to the used x-height of the <a href="https://www.w3.org/TR/css3-fonts/#first-available-font">first available font</a> [[!CSS3-FONTS]].
838839
The x-height is so called because it is often equal to the height of the lowercase "x".
839840
However, an ''ex'' is defined even for fonts that do not contain an "x".
840841
The x-height of a font can be found in different ways. Some fonts
@@ -985,19 +986,19 @@ Absolute lengths: the ''cm'', ''mm'', ''q'', ''in'', ''pt'', ''pc'', ''px'' unit
985986
For such devices it is recommended that the pixel unit
986987
refer to the whole number of device pixels that best approximates the reference pixel.
987988

988-
Note: Note that if the anchor unit is the pixel unit,
989+
Note: If the anchor unit is the pixel unit,
989990
the physical units might not match their physical measurements.
990991
Alternatively if the anchor unit is a physical unit,
991992
the pixel unit might not map to a whole number of device pixels.
992993

993-
Note: Note that this definition of the pixel unit and the physical units
994+
Note: This definition of the pixel unit and the physical units
994995
differs from previous versions of CSS.
995996
In particular, in previous versions of CSS the pixel unit and the physical units
996997
were not related by a fixed ratio:
997998
the physical units were always tied to their physical measurements
998999
while the pixel unit would vary to most closely match the reference pixel.
9991000
(This change was made because too much existing content relies on the assumption of 96dpi,
1000-
and breaking that assumption breaks the content.)
1001+
and breaking that assumption broke the content.)
10011002

10021003
The <dfn export>reference pixel</dfn> is the visual angle of one pixel on a device with a pixel density of 96dpi
10031004
and a distance from the reader of an arm's length.
@@ -1043,7 +1044,9 @@ Absolute lengths: the ''cm'', ''mm'', ''q'', ''in'', ''pt'', ''pc'', ''px'' unit
10431044
square reference pixel is implemented by 16 dots. For
10441045
the monitor screen, one square reference pixel is
10451046
implemented by a single dot.'>
1046-
<figcaption>Showing that more device pixels (dots) are needed to cover a 1px by 1px area on a high-resolution device than on a low-res one</figcaption>
1047+
<figcaption>Showing that more device pixels (dots) are needed to cover a 1px by 1px area
1048+
on a high-resolution device than on a lower-resolution one
1049+
(of the same approximate viewing distance)</figcaption>
10471050
</figure>
10481051

10491052
<h2 id="other-units">
@@ -1170,21 +1173,21 @@ Resolution Units: the <<resolution>> type and ''dpi'', ''dpcm'', ''dppx'' units<
11701173

11711174
<dl export>
11721175
<dt><dfn>dpi</dfn>
1173-
<dd>dots per inch
1176+
<dd>Dots per inch.
11741177

11751178
<dt><dfn>dpcm</dfn>
1176-
<dd>dots per centimeter
1179+
<dd>Dots per centimeter.
11771180

11781181
<dt><dfn>dppx</dfn>
1179-
<dd>dots per ''px'' unit
1182+
<dd>Dots per ''px'' unit.
11801183
</dl>
11811184

11821185
The <<resolution>> unit represents the size of a single "dot" in a graphical representation
11831186
by indicating how many of these dots fit in a CSS ''in'', ''cm'', or ''px''.
11841187
For uses, see e.g. the ''resolution'' media query in [[MEDIAQ]]
11851188
or the 'image-resolution' property defined in [[CSS3-IMAGES]].
11861189

1187-
Note: Note that due to the 1:96 fixed ratio of CSS ''in'' to CSS ''px'',
1190+
Note: Due to the 1:96 fixed ratio of CSS ''in'' to CSS ''px'',
11881191
''1dppx'' is equivalent to ''96dpi''.
11891192
This corresponds to the default resolution of images displayed in CSS: see 'image-resolution'.
11901193

@@ -1261,15 +1264,16 @@ Functional Notations</h2>
12611264
(i.e. a <<function-token>>)
12621265
followed by the argument(s) to the notation
12631266
followed by a right parenthesis.
1264-
White space is allowed, but optional, immediately inside the parentheses.
1267+
<a href="https://www.w3.org/TR/css-syntax/#whitespace">White space</a> is allowed, but optional,
1268+
immediately inside the parentheses.
12651269
Functions can take multiple arguments,
12661270
which are formatted similarly to a CSS property value.
12671271

12681272
Some legacy functional notations, such as ''rgba()'', use commas unnecessarily,
12691273
but generally commas are only used to separate items in a list,
12701274
or pieces of a grammar that would be ambiguous otherwise.
12711275
If a comma is used to separate arguments,
1272-
whitespace is optional before and after the comma.
1276+
<a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a> is optional before and after the comma.
12731277

12741278
<div class="example">
12751279
<pre>
@@ -1383,8 +1387,9 @@ Syntax</h4>
13831387

13841388
<p noexport>Where a <dfn>&lt;dimension></dfn> is a <a>dimension</a>.
13851389

1386-
In addition, whitespace is required on both sides of the ''+'' and ''-'' operators.
1387-
(The ''*'' and ''/'' operaters can be used without whitespace around them.)
1390+
In addition, <a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a>
1391+
is required on both sides of the ''+'' and ''-'' operators.
1392+
(The ''*'' and ''/'' operaters can be used without white space around them.)
13881393

13891394
UAs must support ''calc()'' expressions of at least 20 terms,
13901395
where each <code>NUMBER</code>, <code>DIMENSION</code>, or <code>PERCENTAGE</code> is a term.
@@ -1455,8 +1460,8 @@ Type Checking</h4>
14551460
(as purely-numeric expressions can be evaluated without any additional
14561461
information at parse time).
14571462

1458-
Note: Note that algebraic simplifications do not affect the validity of the ''calc()'' expression or its resolved type.
1459-
For example, ''calc(5px - 5px + 10s)'' or ''calc(0 * 5px + 10s)'' are both invalid
1463+
Note: Algebraic simplifications do not affect the validity of the ''calc()'' expression or its resolved type.
1464+
For example, ''calc(5px - 5px + 10s)'' and ''calc(0 * 5px + 10s)'' are both invalid
14601465
due to the attempt to add a length and a time.
14611466

14621467
<h4 id='calc-computed-value'>
@@ -1518,7 +1523,7 @@ Range Checking</h4>
15181523
The value resulting from an expression must be clamped to the
15191524
range allowed in the target context.
15201525

1521-
Note: Note this requires all contexts accepting ''calc()''
1526+
Note: This requires all contexts accepting ''calc()''
15221527
to define their allowable values as a closed (not open) interval.
15231528

15241529
<div class=example>
@@ -1649,12 +1654,12 @@ Toggling Between Values: ''toggle()''</h3>
16491654
or there was no match,
16501655
the computed value of ''toggle()'' is the computed value that the first argument represents.
16511656

1652-
Note: Note that ''toggle()'' explicitly looks at the computed value of the parent,
1657+
Note: That ''toggle()'' explicitly looks at the computed value of the parent,
16531658
so it works even on non-inherited properties.
16541659
This is similar to the ''inherit'' keyword,
16551660
which works even on non-inherited properties.
16561661

1657-
Note: Note that the <a href="https://www.w3.org/TR/CSS21/cascade.html#computed-value">computed value</a> of a property is an abstract set of values,
1662+
Note: That the <a href="https://www.w3.org/TR/CSS21/cascade.html#computed-value">computed value</a> of a property is an abstract set of values,
16581663
not a particular serialization [[!CSS21]],
16591664
so comparison between computed values should always be unambiguous and have the expected result.
16601665
For example,
@@ -1685,7 +1690,7 @@ Toggling Between Values: ''toggle()''</h3>
16851690
</pre>
16861691

16871692
Note that, since ''1px'' appears twice in the top and bottom margins,
1688-
they will cycle between only two value
1693+
they will cycle between only two values
16891694
while the left and right margins cycle through three.
16901695
In other words, the declarations above will yield the same computed values
16911696
as the longhand declarations below:
@@ -1750,7 +1755,7 @@ Ian's proposal:
17501755
If it's absent,
17511756
the default value for the given <<type-or-unit>> (from the list below) is implied.
17521757

1753-
Note: Note that, unlike <<toggle-value>>s,
1758+
Note: Unlike <<toggle-value>>s,
17541759
an ''attr()'' <<attr-fallback>> value may contain top-level commas,
17551760
as it is always the last argument in the functional notation.
17561761

@@ -1761,7 +1766,7 @@ Ian's proposal:
17611766
the attr() expression's type is valid where the attr() expression is placed,
17621767

17631768
<li>
1764-
if the attribute name is given with a namespace prefix, the prefix is defined
1769+
the namespace prefix of the attribute name, if any, is defined,
17651770

17661771
<li>
17671772
the <<attr-fallback>> is valid where the attr() expression is placed,
@@ -1782,7 +1787,7 @@ Ian's proposal:
17821787
like in ''width: attr(size px, auto);''.
17831788

17841789
If the attr() is used alongside other values to form the full property value,
1785-
however, the default value must match the attr()&#39;s type.
1790+
however, then the default value must match the attr()&#39;s type.
17861791
For example, ''box-shadow: attr(size px, inset) 5px 10px blue;'' is invalid,
17871792
even though it would create a valid declaration if you substituted the attr() expression
17881793
with either a ''px'' length <em>or</em> the ''box-shadow/inset'' keyword.
@@ -1791,7 +1796,8 @@ Ian's proposal:
17911796
If the specified attribute exists on the element,
17921797
the value of the attribute must be parsed as required by the <<type-or-unit>> argument
17931798
(as defined in the list below).
1794-
Unless the type is ''string'', it must first be stripped of leading and trailing white space.
1799+
Unless the type is ''string'', it must first be stripped of leading and trailing
1800+
<a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a>.
17951801
The resulting value is the attr() expression's value.
17961802
If the value did not parse as required,
17971803
the attr() expression's value is its fallback value.
@@ -1804,9 +1810,9 @@ Ian's proposal:
18041810
The attribute value is taken as the contents of a CSS <<string>>.
18051811
The default is the empty string.
18061812

1807-
Note: this does not reparse the attribute value with the CSS parser.
1808-
So, for example, an attribute whose value is "\33" will produce a string containing those three characters,
1809-
not a string containing "3" (the character that the escape would evaluate to).
1813+
Note: This does not reparse the attribute value with the CSS parser.
1814+
So, for example, an attribute whose value is "\51" will produce a string containing those three characters,
1815+
not a string containing "Q" (the character that the escape would evaluate to).
18101816

18111817
<dt>''color''
18121818
<dd>
@@ -2098,7 +2104,7 @@ Changes</h2>
20982104
<li>Added notation for restricting the length of comma-separated lists
20992105
specified with the ''#'' notation.
21002106
<li>Clarified handling of ''toggle()'' when used in shorthand declarations.
2101-
<li>Clarified that stringing together re-orderable combinations allows interleaving.
2107+
<li>Clarified that stringing together reorderable combinations allows interleaving.
21022108
<li>Changed syntax references from the 2.1 grammar to the Syntax spec.
21032109
</ul>
21042110

0 commit comments

Comments
 (0)