Skip to content

Commit 53fc15e

Browse files
committed
[css2] Tantek's edits after Nov 2002 ftf
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401963
1 parent 472c6f9 commit 53fc15e

6 files changed

Lines changed: 306 additions & 146 deletions

File tree

css2/colors.src

Lines changed: 58 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: colors.src,v 2.27 2002-08-02 17:37:18 bbos Exp $ -->
3+
<!-- $Id: colors.src,v 2.28 2002-11-17 19:28:26 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Colors and backgrounds</TITLE>
7+
<!-- Changed by: Tantek Celik, 2002-11-16 -->
8+
<style type="text/css">
9+
.current,.proposed { background:#feb }
10+
ins.proposed { background:#bfb }
11+
del.proposed { background:#fbb }
12+
body>del,body>ins {display:block}
13+
</style>
714
</HEAD>
815
<BODY>
916
<H1>Colors and Backgrounds</H1>
1017

11-
<P>CSS properties allow authors to specify the foreground color and
18+
<p>CSS properties allow authors to specify the foreground color and
1219
background of an element. Backgrounds may be colors or
1320
images. Background properties allow authors to position a background image,
1421
repeat it, and declare whether it should be fixed with respect
1522
to the <a href="visuren.html#viewport">viewport</a> or scrolled
1623
along with the document.
17-
18-
<P> See the section on <a href="./syndata.html#color-units">color units</a>
24+
</p>
25+
<p> See the section on <a href="./syndata.html#color-units">color units</a>
1926
for the syntax of valid color values.
20-
27+
</p>
2128
<H2><a name="colors">Foreground color</a>: the <span
2229
class="propinst-color">'color'</span> property</H2>
2330

@@ -44,8 +51,7 @@ href="box.html#box-padding-area">padding</a> and <a
4451
href="box.html#box-border-area">border</a> areas. Border colors
4552
and styles are set with the <a
4653
href="box.html#border-properties">border properties</a>. Margins
47-
are always transparent so the background of the parent box always
48-
shines through.
54+
are always transparent.
4955

5056
<P>Background properties are not inherited, but the parent box's
5157
background will shine through by default because of the initial
@@ -76,7 +82,7 @@ HTML document will have a "marble" background:
7682
&lt;HEAD&gt;
7783
&lt;TITLE&gt;Setting the canvas background&lt;/TITLE&gt;
7884
&lt;STYLE type="text/css"&gt;
79-
BODY { background: url("http://style.com/marble.png") }
85+
BODY { background: url("http://example.com/marble.png") }
8086
&lt;/STYLE&gt;
8187
&lt;/HEAD&gt;
8288
&lt;BODY&gt;
@@ -123,6 +129,7 @@ the color is visible in the transparent parts of the image).
123129
title="&lt;uri&gt;"><span
124130
class="value-inst-uri">&lt;uri&gt;</span></span>, to specify the
125131
image, or 'none', when no image is used.
132+
</P>
126133

127134
<div class="example"><P>
128135
<PRE>
@@ -133,12 +140,18 @@ p { background-image: none }
133140

134141
<!-- #include src=properties/background-repeat.srb -->
135142

136-
<P>If a background image is specified, this property specifies whether
143+
<p>If a background image is specified, this property specifies whether
137144
the image is repeated (tiled), and how. All tiling covers the <a
138145
href="box.html#box-content-area">content</a>, <a
139146
href="box.html#box-padding-area">padding</a> and <a
140147
href="box.html#box-border-area">border</a> areas of a box.
141-
Values have the following meanings:</p>
148+
<ins class="proposed">
149+
The tiling and positioning of the
150+
background-image on inline elements is undefined in this specification.
151+
A future level of CSS may define the tiling and positioning of the
152+
background-image on inline elements.
153+
</ins>
154+
<p>Values have the following meanings:</p>
142155

143156
<dl>
144157
<dt><strong>repeat</strong>
@@ -171,14 +184,15 @@ the element.
171184

172185
<!-- #include src=properties/background-attachment.srb -->
173186

174-
<P>If a background image is specified, this property specifies
187+
<p>If a background image is specified, this property specifies
175188
whether it is fixed with regard to the <a
176-
href="visuren.html#viewport">viewport</a> ('fixed') or scrolls along with the
177-
document ('scroll').
189+
href="visuren.html#viewport">viewport</a> ('fixed') or scrolls along
190+
with the containing block ('scroll').</p>
178191

179-
<p>Note that there is only one viewport per view. If an element has a
180-
scrolling mechanism (see 'overflow'), a 'fixed' background doesn't
181-
move with it.
192+
<p>Note that there is only one viewport per view. If an element has
193+
a scrolling mechanism (see 'overflow'), a 'fixed' background doesn't
194+
move with the element, and a 'scroll' background doesn't move with
195+
the scrolling mechanism.</p>
182196

183197
<p>Even if the image is fixed, it is still only visible when it is in
184198
the background, padding or border area of the element. Thus, unless
@@ -195,10 +209,29 @@ body {
195209
</PRE>
196210
</div>
197211

198-
<P>User agents may treat 'fixed' as 'scroll'. However, it is
212+
<del class="current">
213+
<p>
214+
User agents may treat 'fixed' as 'scroll'. However, it is
199215
recommended they interpret 'fixed' correctly, at least for the HTML and
200216
BODY elements, since there is no way for an author to provide an image
201-
only for those browsers that support 'fixed'. See the section on <a
217+
only for those browsers that support 'fixed'.
218+
</p>
219+
</del>
220+
<ins class="proposed">
221+
<p>
222+
User agents that do not support 'fixed' backgrounds (for example due
223+
to limitations of the hardware platform) should ignore declarations
224+
with the keyword 'fixed'. For example:
225+
</p>
226+
<pre>
227+
body {
228+
background: white url(paper.png) scroll; /* for all UAs */
229+
background: white url(ledger.png) fixed; /* for UAs that do fixed backgrounds */
230+
}
231+
</pre>
232+
</ins>
233+
<p>
234+
See the section on <a
202235
href="conform.html#conformance">conformance</a> for details.
203236

204237
<!-- #include src=properties/background-position.srb -->
@@ -223,8 +256,8 @@ across and 84% down the padding area.
223256
class="value-inst-length"><strong>&lt;length&gt;</strong></span></span>
224257
<span class="index-inst" title="&lt;length&gt;"><span
225258
class="value-inst-length"><strong>&lt;length&gt;</strong></span></span>
226-
<dd> With a value pair of '2cm 2cm', the upper left corner of the image
227-
is placed 2cm to the right and 2cm below the upper left corner of the
259+
<dd> With a value pair of '2cm 1cm', the upper left corner of the image
260+
is placed 2cm to the right and 1cm below the upper left corner of the
228261
padding area.
229262
<dt>
230263
<dt><strong>top left</strong> and <strong>left top</strong>
@@ -254,14 +287,14 @@ padding area.
254287
<dd>Same as '100% 100%'.
255288
</dl>
256289

257-
<P> If only one percentage or length value is given, it sets the
258-
horizontal position only, the vertical position will be 50%. If two
290+
<p> If only one percentage or length value is given, it sets the
291+
horizontal position only, and the vertical position will be 50%. If two
259292
values are given, the horizontal position comes first. Combinations of
260293
length and percentage values are allowed, (e.g., '50% 2cm'). Negative
261294
positions are allowed. Keywords cannot be combined with percentage
262295
values or length values (all possible combinations are given above).
263-
264-
<div class="example"><P>
296+
</p>
297+
<div class="example">
265298

266299
<PRE>
267300
body { background: url("banner.jpeg") right top } /* 100% 0% */
@@ -353,7 +386,7 @@ on current platforms is:
353386
converted to R'=R<SUP>gamma</SUP>, G'=G<SUP>gamma</SUP>,
354387
B'=B<SUP>gamma</SUP>, before being handed to the OS.
355388

356-
<P>This may rapidly be done by building a 256-element lookup table
389+
<P>This may be done rapidly by building a 256-element lookup table
357390
once per browser invocation thus:
358391

359392
<PRE>

css2/fonts.src

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,56 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
22
"http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
33
<html lang="en">
4-
<!-- $Id: fonts.src,v 2.68 2002-08-02 19:30:33 bbos Exp $ -->
4+
<!-- $Id: fonts.src,v 2.69 2002-11-17 19:28:45 bbos Exp $ -->
55
<HEAD>
66
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
77
<TITLE>Fonts</TITLE>
8+
<!-- Changed by: Tantek Celik, 2002-11-16 -->
89
<style type="text/css">
910
#AutoNumber2 td { text-align:center }
1011
</style>
11-
<!-- Changed by: Tantek Celik, 2002-06-09 -->
12+
<style type="text/css">
13+
.current,.proposed { background:#feb }
14+
ins.proposed { background:#bfb }
15+
del.proposed { background:#fbb }
16+
body>del,body>ins {display:block}
17+
</style>
1218
</HEAD>
1319
<BODY>
1420

1521
<h1>Fonts</h1>
1622

1723
<h2>Introduction</h2>
1824

19-
<P>Setting font properties will be among the most common uses of style
25+
<p>Setting font properties will be among the most common uses of style
2026
sheets. Unfortunately, there exists no well-defined and universally
2127
accepted taxonomy for classifying fonts, and terms that apply to one
2228
font family may not be appropriate for others. E.g. 'italic' is
2329
commonly used to label slanted text, but slanted text may also be
2430
labeled as being <EM>Oblique, Slanted, Incline, Cursive</EM> or
2531
<EM>Kursiv</EM>. Therefore it is not a simple problem to map typical
2632
font selection properties to a specific font.
33+
</p>
2734

2835
<h2><a name="algorithm">Font matching algorithm</a></h2>
2936

30-
<P>Because there is no accepted, universal taxonomy of font
37+
<p>Because there is no accepted, universal taxonomy of font
3138
properties, matching of properties to font faces must be done
3239
carefully. The properties are matched in a well-defined order to
3340
insure that the results of this matching process are as consistent as
3441
possible across UAs (assuming that the same library of font faces is
3542
presented to each of them).
43+
</p>
3644

3745
<OL>
3846

3947
<LI>The User Agent makes (or accesses) a database of relevant CSS&nbsp;2.1
40-
properties of all the fonts of which the UA is aware. The UA may be
41-
aware of a font because it has been installed locally or it has been
42-
previously downloaded over the web. If there are two fonts with
48+
properties of all the fonts of which the UA is aware.
49+
If there are two fonts with
4350
exactly the same properties, one of them is ignored.
4451

4552
<LI>At a given element and for each character in that element, the UA
46-
assembles the font-properties applicable to that element. Using the
53+
assembles the font properties applicable to that element. Using the
4754
complete set of properties, the UA uses the 'font-family' property to
4855
choose a tentative font family. The remaining properties are tested
4956
against the family according to the matching criteria described with
@@ -98,8 +105,9 @@ never fail. (See 'font-weight' below.)
98105
UA-dependent margin of tolerance. (Typically, sizes for scalable fonts
99106
are rounded to the nearest whole pixel, while the tolerance for
100107
bitmapped fonts could be as large as 20%.) Further computations, e.g.
101-
by 'em' values in other properties, are based on the 'font-size' value
102-
that is used, not the one that is specified.
108+
by 'em' values in other properties, are based on
109+
the computed value of 'font-size'.
110+
103111

104112
</OL>
105113

@@ -113,21 +121,27 @@ family names. Unlike most other CSS properties, values are separated
113121
by a comma to indicate that they are alternatives:
114122

115123
<PRE>
116-
body { font-family: gill, helvetica, sans-serif }
124+
body { font-family: Gill, Helvetica, sans-serif }
117125
</PRE>
118126

119127
<P>Although many fonts provide the "missing character" glyph,
120128
typically an open box, as its name implies this should not be
121-
considered a match.
129+
considered a match
130+
<del class="current">.</del>
131+
<ins class="proposed">
132+
for characters that cannot be found in the font. (It should,
133+
however, be considered a match for U+FFFD, the "missing character"
134+
character's code point).
135+
</ins>
122136

123137
<P>There are two types of font family names:
124138

125139
<DL>
126140

127141
<dt><a name="value-def-family-name">&lt;family-name&gt;</a>
128142

129-
<DD>The name of a font family of choice. In the last example, "gill"
130-
and "helvetica" are font families.
143+
<DD>The name of a font family of choice. In the last example, "Gill"
144+
and "Helvetica" are font families.
131145

132146
<dt><a name="value-def-generic-family">&lt;generic-family&gt;</a>
133147

@@ -149,14 +163,14 @@ following generic families are defined:
149163
</UL>
150164

151165
<P>Style sheet designers are encouraged to offer a generic font family
152-
as a last alternative.
166+
as a last alternative. Generic font family names are keywords and must NOT be quoted.
153167

154168
</DL>
155169

156170
<P>Font names containing whitespace should be quoted:
157171

158172
<PRE>
159-
body { font-family: "new century schoolbook", serif }
173+
body { font-family: "New Century Schoolbook", serif }
160174

161175
&lt;BODY STYLE="font-family: 'My own font', fantasy"&gt;
162176
</PRE>
@@ -213,7 +227,8 @@ characters. As a last resort, uppercase letters will be used as
213227
replacement for a small-caps font.
214228

215229
<P>The following example results in an 'H3' element in small-caps,
216-
with emphasized words in oblique small-caps:
230+
with any emphasized words in oblique, and any emphasized words within
231+
an 'H3' oblique small-caps:
217232

218233
<PRE>
219234
h3 { font-variant: small-caps }
@@ -259,8 +274,8 @@ strong { font-weight: bolder }
259274
values are names that are descriptive of the "weight" of a font. There
260275
is no accepted, universal meaning to these weight names. Their primary
261276
role is to distinguish faces of differing darkness within a single
262-
font family. Usage across font families is quite variant; for example
263-
a font that you might think of as being bold might be described as
277+
font family. Usage across font families is quite variant; for example,
278+
a font that one might think of as being bold might be described as
264279
being <EM>Regular, Roman, Book, Medium, Semi-</EM> or <EM>DemiBold,
265280
Bold,</EM> or <EM>Black,</EM> depending on how black the "normal" face
266281
of the font is within the design. Because there is no standard usage
@@ -364,7 +379,7 @@ the next lighter numerical value (and keeps the font unchanged).
364379

365380
<P>There is no guarantee that there will be a darker face for each of
366381
the 'font-weight' values; for example, some fonts may have only a
367-
normal and a bold face, others may have eight different face weights.
382+
normal and a bold face, while others may have eight face weights.
368383
There is no guarantee on how a UA will map font faces within a family
369384
to weight values. The only guarantee is that a face of a given value
370385
will be no less dark than the faces of lighter values.
@@ -446,7 +461,7 @@ to another.
446461

447462
<p class="note"><em><strong>Note 1.</strong> To preserve readability, a UA applying
448463
these guidelines should nevertheless avoid creating font-size resulting
449-
in less than 9 pixels per EM unit on a computer display .</em></p>
464+
in less than 9 pixels per EM unit on a computer display.</em></p>
450465

451466
<p class="note"><em><strong>Note 2.</strong> In CSS1, the suggested
452467
scaling factor between adjacent indexes was 1.5 which user experience
@@ -476,8 +491,8 @@ into account when calculating the font size of the element.
476491
<P>Negative values are not allowed.
477492

478493
<P>On all other properties, 'em' and 'ex' length values refer to the
479-
font size of the current element. On the 'font-size' property, these
480-
length units refer to the font size of the parent element.
494+
computed font size of the current element. On the 'font-size' property, these
495+
length units refer to the computed font size of the parent element.
481496

482497
<P>Note that an application may reinterpret an explicit size,
483498
depending on the context. E.g., inside a VR scene a font may get a
@@ -522,7 +537,7 @@ For a definition of allowed and initial values, see the previously defined prope
522537
<PRE>
523538
p { font: 12px/14px sans-serif }
524539
p { font: 80% sans-serif }
525-
p { font: x-large/110% "new century schoolbook", serif }
540+
p { font: x-large/110% "New Century Schoolbook", serif }
526541
p { font: bold italic large Palatino, serif }
527542
p { font: normal small-caps 120%/120% fantasy }
528543
</PRE>
@@ -562,7 +577,8 @@ fonts">system fonts</span>:</p>
562577
</dl>
563578

564579
<P>System fonts may only be set as a whole; that is, the font
565-
family, size, weight, style, etc. are all set at the same time.These values may then be altered individually if desired. If no
580+
family, size, weight, style, etc. are all set at the same time.
581+
These values may then be altered individually if desired. If no
566582
font with the indicated characteristics exists on a given platform,
567583
the user agent should either intelligently substitute (e.g., a smaller
568584
version of the 'caption' font might be used for the 'small-caption'
@@ -600,6 +616,7 @@ to its initial value, this has the same effect as this declaration:
600616

601617
<pre>
602618
button p {
619+
font-family: Charcoal;
603620
font-style: normal;
604621
font-variant: normal;
605622
font-weight: 600;

0 commit comments

Comments
 (0)