Skip to content

Commit e0b96b1

Browse files
committed
[css2] Steve Pemberton comments
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40343
1 parent c6f2722 commit e0b96b1

1 file changed

Lines changed: 34 additions & 20 deletions

File tree

css2/syndata.src

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: syndata.src,v 1.22 1997-10-30 08:42:23 ian Exp $ -->
3+
<!-- $Id: syndata.src,v 1.23 1997-10-30 21:37:34 ian Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>CSS2 syntax and basic data types</TITLE>
@@ -30,8 +30,9 @@ href="grammar.html">Appendix B</a>.
3030
the HTML attributes 'id' and 'class', of font names, and of URLs
3131
lies outside the scope of this specification.
3232

33-
<LI> In CSS2, selectors (element names, classes and IDs) can
34-
contain only the characters [A-Za-z0-9] and <a rel="biblioentry"
33+
<LI> In CSS2, <a href="selector.html">selectors</a> (element
34+
names, classes and IDs) can contain only the characters
35+
[A-Za-z0-9] and <a rel="biblioentry"
3536
href="./refs.html#ref-UNICODE">[UNICODE]</a> characters 161-255,
3637
plus the hyphen (-); they cannot start with a hyphen or a digit;
3738
they can also contain escaped characters and any Unicode character
@@ -64,6 +65,9 @@ title="at-rules|@-rules"><em>at-rules</em></span> and <span
6465
class="index-inst" title="rule sets"><em>rule sets.</em></span> There
6566
may be whitespace (spaces, tabs, newlines) around the statements.
6667

68+
<P>In this specification, the expressions "immediately before" or
69+
"immediate after" mean "with no intervening white space.
70+
6771
<H3><a name="at-rules">At-rules</a></H3>
6872

6973
<P> At-rules start with an <DFN>at-keyword</DFN>, which is an
@@ -139,6 +143,9 @@ match the opening quote:
139143
<PRE>
140144
{ causta: "}" + ({7} * '\'') }
141145
</PRE>
146+
147+
<P>Note that the above rule is not legal CSS2, but it is still
148+
a block as defined.
142149
</div>
143150

144151
<H3>Rule sets, declaration blocks, and selector-strings</H3>
@@ -154,10 +161,11 @@ there is a list of zero or more <DFN>declarations,</DFN> separated by
154161
semicolons (;).
155162

156163
<P>The <span class="index-def"
157-
title="selector-string"><em>selector-string</em></span> consists of
164+
title="selector-string"><em>selector-string</em></span> (see also the
165+
section on <a href="selector.html">selectors</a> consists of
158166
everything up to (but not including) the first left curly brace ({).
159-
A selector-string does not start with an "@", does not include a "{",
160-
that always goes together with a {}-block. When a UA can't parse the
167+
A selector-string that does not start with an "@" and does not include a "{"
168+
always goes together with a {}-block. When a UA can't parse the
161169
selector-string (i.e., it is not valid CSS2), it should skip the
162170
{}-block as well.
163171

@@ -208,7 +216,7 @@ CSS2. The CSS2 UA will skip the rule set, reducing the style sheet to:
208216
<P>would not since it is not followed by a {}-block.
209217
</div>
210218

211-
<H3><a name="properties">Properties</a></H3>
219+
<H3>Declarations and <a name="properties">properties</a></H3>
212220

213221
<P> A declaration consists of a <span class="index-inst"
214222
title="property"><em>property</em></span>, a colon (:) and a
@@ -331,7 +339,7 @@ to:
331339
</PRE>
332340
</UL>
333341

334-
<H2><a href="data-types">Basic Data types</a></H2>
342+
<H2><a href="data-types">Values</a></H2>
335343
<H3>Integers and numbers</H3>
336344

337345
<P>Some value types may have integer values, denoted by <span
@@ -367,7 +375,7 @@ abbreviation). After a '0' number, the unit identifier is optional.
367375
<P> Some properties allow negative length units, but this may
368376
complicate the formatting model and there may be
369377
implementation-specific limits. If a negative length value cannot be
370-
supported, it should be clipped to the nearest value that can be
378+
supported, it should be converted to the nearest value that can be
371379
supported.
372380

373381
<P><a href="absrel-units">There are two types of length units:
@@ -385,7 +393,7 @@ keyword values (e.g. 'x-large') offer similar advantages.
385393
<div class="example"><P>
386394
<PRE>
387395
H1 { margin: 0.5em } /* ems, the height of the element's font */
388-
H1 { margin: 1ex } /* x-height, ~ the height of the letter 'x' */
396+
H1 { margin: 1ex } /* x-height, the height of the letter 'x' */
389397
P { font-size: 12px } /* pixels, relative to viewing device */
390398
</PRE>
391399
</div>
@@ -404,7 +412,7 @@ used in the <span class="propinst-font-size">'font-size'</span>
404412
property, where they are relative to the font size inherited from the
405413
parent element. It is considered an error if these units are used for
406414
the <span class="propinst-font-size">'font-size'</span> property on
407-
the root of the document tree.
415+
an element that cannot inherit a font size.
408416

409417
<div class="example"><P>
410418
<P>The rule:
@@ -447,12 +455,11 @@ their parent; they inherit the computed values. For example:
447455
font-size: 12pt;
448456
text-indent: 3em; /* i.e. 36pt */
449457
}
450-
H1 { font-size: 15pt } /* H1 is a child of BODY */
458+
H1 { font-size: 15pt }
451459
</PRE>
452460

453461
<P> In the example above, the 'text-indent' value of H1 elements
454-
will be 36pt, not 45pt. Note that H1 elements inherit from the
455-
BODY element in HTML.
462+
will be 36pt, not 45pt, if H1 is a child of the BODY element.
456463
</div>
457464

458465
<P><span class="index-def" title="absolute length"><em> Absolute
@@ -549,8 +556,8 @@ whatever image is described by the resource named <tt>yellow</tt> in the same
549556
directory as <tt>basic.css</tt>.
550557
</div>
551558

552-
<P>A URL that designates a file of the wrong type is considered an
553-
erroneous URL. User agents may vary in how they handle such cases.
559+
<P>User agents may vary in how they handle URLs that designate
560+
unavailable or inapplicable resources.
554561

555562
<H3><a name="color-units">Colors</a></H3>
556563

@@ -570,7 +577,7 @@ specification.
570577
H2 { color: olive }
571578
</PRE>
572579
<P>
573-
The RGB color model is being used in numerical color specifications. These
580+
The RGB color model is used in numerical color specifications. These
574581
examples all specify the same color:
575582
<PRE>
576583
EM { color: #f00 } /* #rgb */
@@ -638,9 +645,11 @@ with <a href="./aural.html">aural cascading style sheets</a>.
638645
</UL>
639646

640647
<p>Values in these units may be negative. They should be normalized to
641-
the range 0-360deg by the UA. For example, 10deg and 350deg are
648+
the range 0-360deg by the UA. For example, -10deg and 350deg are
642649
equivalent.
643650

651+
<P>The angle value must be immediately followed by the angle unit.
652+
644653
<H3>Time</H3>
645654

646655
<P>Time units (denoted by <span class="index-def" title="&lt;time&gt;,
@@ -655,7 +664,8 @@ sheets</a>.
655664
<LI>s: seconds
656665
</UL>
657666

658-
<p>Time values may not be negative.
667+
<p>Time values may not be negative. The time value must be followed
668+
immediately by the time unit.
659669

660670
<H3>Frequencies</H3>
661671

@@ -673,9 +683,13 @@ sheets</a>.
673683
</ul>
674684

675685
<div class="example"><P>
676-
For example, 200Hz is a bass sound, and 6kHz is a treble sound.
686+
For example, 200Hz (or 200hz) is a bass sound, and 6kHz (or 6khz)
687+
is a treble sound.
677688
</div>
678689

690+
<P>The frequency value must be followed immediately by the frequency
691+
unit.
692+
679693
<H2>CSS embedded in HTML</H2>
680694

681695
<P> CSS style sheets may be embedded in HTML documents, and to be able

0 commit comments

Comments
 (0)