Skip to content

Commit 1d892fa

Browse files
committed
[css2] Made text more precise. Fixed some minor errors.
Removed "HTML" from "HTML user agent" (what is an "HTML user agent?) --HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401626
1 parent 1430c12 commit 1d892fa

1 file changed

Lines changed: 49 additions & 39 deletions

File tree

css2/text.src

Lines changed: 49 additions & 39 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: text.src,v 2.17 1998-04-30 18:29:23 howcome Exp $ -->
3+
<!-- $Id: text.src,v 2.18 1998-05-03 23:42:04 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Text</TITLE>
@@ -53,7 +53,7 @@ class="propinst-text-align">'text-align'</span> property</H2>
5353

5454
<!-- #include src=properties/text-align.srb -->
5555

56-
<P>This property describes how a block of text is aligned. Values
56+
<P>This property describes how inline content of a block is aligned. Values
5757
have the following meanings:</P>
5858

5959
<dl>
@@ -66,25 +66,27 @@ class="value-inst-string"><strong>&lt;string&gt;</strong></span></span>
6666
align (see the section on <a href="tables.html#column-alignment">
6767
horizontal alignment in a column</a> for details and an example).
6868
This value applies <em>only</em> to <a href="tables.html">table</a>
69-
columns.
69+
cells.
7070
</dl>
7171

7272
<P>A block of text is a stack of <a href="visuren.html#line-box">line
73-
boxes</a>. In all cases except for 'justify', this property specifies
73+
boxes</a>. In the case of 'left', 'right' and 'center', this property specifies
7474
how the inline boxes within each line box align with respect to the line
7575
box's left and right sides; alignment is not with respect to the <a
7676
href="visuren.html#viewport">viewport</a>. In the case of 'justify',
7777
the UA may stretch the inline boxes in addition to adjusting their
78-
positions.
78+
positions. (See also <span
79+
class="propinst-letter-spacing">'letter-spacing'</span> and <span
80+
class="propinst-word-spacing">'word-spacing'</span>.)
7981

8082
<div class="example"><P>
8183
In this example, note that since <span
8284
class="propinst-text-align">'text-align'</span> is inherited, all
8385
block-level elements inside the DIV element with 'class=center' will
84-
be centered.
86+
have their inline content centered.
8587

8688
<PRE>
87-
DIV.center { text-align: center }
89+
DIV.center { text-align: center }
8890
</PRE>
8991
</div>
9092

@@ -94,7 +96,8 @@ The actual justification algorithm used is user-agent and written language
9496
dependent.</em>
9597

9698
<P><em><span class="index-inst" title="conformance"><a
97-
href="conform.html#conformance">Conforming HTML user agents</a></span> may
99+
href="conform.html#conformance">Conforming <!--HTML [What is an "HTML
100+
UA"? BB--> user agents</a></span> may
98101
interpret the value 'justify' as 'left' or 'right', depending on
99102
whether the element's default writing direction is left-to-right or
100103
right-to-left, respectively.</em>
@@ -149,7 +152,7 @@ In the following example for HTML, the text content of all
149152
A elements acting as hyperlinks will be underlined:</p>
150153

151154
<PRE>
152-
A[href] { text-decoration: underline }
155+
A[href] { text-decoration: underline }
153156
</PRE>
154157
</div>
155158

@@ -201,15 +204,15 @@ have the same color as the element itself, and since no blur radius is
201204
specified, the text shadow will not be blurred:</p>
202205

203206
<PRE>
204-
H1 { text-shadow: 0.2em 0.2em }
207+
H1 { text-shadow: 0.2em 0.2em }
205208
</PRE>
206209

207210
<P>The next example will place a shadow to the right and below
208211
the element's text. The shadow will have a 5px blur radius and will be
209212
red.
210213

211214
<PRE>
212-
H2 { text-shadow: 3px 3px 5px red }
215+
H2 { text-shadow: 3px 3px 5px red }
213216
</PRE>
214217

215218
<P>The next example specifies a list of shadow effects. The first
@@ -223,7 +226,7 @@ class="propinst-color">'color'</span>
223226
property will be used:</p>
224227

225228
<PRE>
226-
H2 { text-shadow: 3px 3px red, yellow -3px 3px 2px, 3px -3px }
229+
H2 { text-shadow: 3px 3px red, yellow -3px 3px 2px, 3px -3px }
227230
</PRE>
228231

229232
</DIV>
@@ -232,11 +235,11 @@ property will be used:</p>
232235
<P>Consider this example:
233236

234237
<PRE>
235-
SPAN.glow {
238+
SPAN.glow {
236239
background: white;
237240
color: white;
238241
text-shadow: black 0px 0px 5px;
239-
}
242+
}
240243
</PRE>
241244

242245
<P>Here, the <span class="propinst-background">'background'</span> and
@@ -250,7 +253,8 @@ property is used to create a "solar eclipse" effect:</p>
250253
<div class="note"><P>
251254
<em><strong>Note.</strong>
252255
This property is not defined in CSS1. Some shadow
253-
effects may render text invisible in UAs that only support CSS1.
256+
effects (such as the one in the last example) may render text
257+
invisible in UAs that only support CSS1.
254258
</em>
255259
</div>
256260

@@ -265,14 +269,17 @@ text characters. Values have the following meanings:</P>
265269

266270
<dl>
267271
<dt><strong>normal</strong>
268-
<dd>This value allows the user agent to alter the space
272+
<dd>The spacing is the normal spacing for the current font.
273+
This value allows the user agent to alter the space
269274
between characters in order to justify text.
270275
<dt><span class="index-inst" title="&lt;length&gt;"><span
271276
class="value-inst-length"><strong>&lt;length&gt;</strong></span></span>
272277
<dd>This value indicates inter-character space <em>in
273278
addition to</em> the default space between
274279
characters. Values may be negative, but there may be
275280
implementation-specific limits.
281+
User agents may not further increase or decrease the inter-character
282+
space in order to justify text.
276283
</dl>
277284

278285
<P>Character spacing algorithms are user agent-dependent. Character
@@ -284,14 +291,14 @@ In this example, the space between characters in
284291
BLOCKQUOTE elements is increased by '0.1em'.
285292

286293
<PRE>
287-
BLOCKQUOTE { letter-spacing: 0.1em }
294+
BLOCKQUOTE { letter-spacing: 0.1em }
288295
</PRE>
289296

290297
<P>In the following example, the user agent is not permitted
291-
to alter inter-character space, nor to add space:</p>
298+
to alter inter-character space:</p>
292299

293300
<PRE>
294-
BLOCKQUOTE { letter-spacing: 0cm } /* Same as '0' */
301+
BLOCKQUOTE { letter-spacing: 0cm } /* Same as '0' */
295302
</PRE>
296303
</div>
297304

@@ -300,7 +307,7 @@ the default space, user agents should not use
300307
<span class="index-inst" title="ligatures">ligatures.</span>
301308

302309
<P><span class="index-inst" title="conformance"><a
303-
href="conform.html#conformance">Conforming HTML user agents</a></span>
310+
href="conform.html#conformance">Conforming <!--HTML--> user agents</a></span>
304311
may consider the value of the <span
305312
class="propinst-letter-spacing">'letter-spacing'</span> property to be
306313
'normal'.
@@ -312,8 +319,8 @@ Values have the following meanings:</p>
312319

313320
<dl>
314321
<dt><strong>normal</strong>
315-
<dd>This value allows the user agent to alter the space
316-
between words in order to justify text.
322+
<dd>The normal inter-word space, as defined by the current font and/or
323+
the UA.
317324
<dt><span class="index-inst" title="&lt;length&gt;"><span
318325
class="value-inst-length"><strong>&lt;length&gt;</strong></span></span>
319326
<dd>This value indicates inter-word space <em>in
@@ -322,21 +329,21 @@ words. Values may be negative, but there may be
322329
implementation-specific limits.
323330
</dl>
324331

325-
<P>Word spacing algorithms are user agent-dependent. Word spacing may
326-
also be influenced by justification (see the <span
332+
<P>Word spacing algorithms are user agent-dependent. Word spacing is
333+
also influenced by justification (see the <span
327334
class="propinst-text-align">'text-align'</span> property).
328335

329336
<div class="example"><P>
330337
In this example, the word-spacing between each word in H1 elements is
331338
increased by '1em'.
332339

333340
<PRE>
334-
H1 { word-spacing: 1em }
341+
H1 { word-spacing: 1em }
335342
</PRE>
336343
</div>
337344

338345
<P><span class="index-inst" title="conformance"><a
339-
href="conform.html#conformance">Conforming HTML user agents</a></span> may
346+
href="conform.html#conformance">Conforming <!--HTML--> user agents</a></span> may
340347
consider the value of the <span
341348
class="propinst-word-spacing">'word-spacing'</span> property to be
342349
'normal'.
@@ -367,7 +374,7 @@ dependent. See RFC 2070 ([[RFC2070]]) for ways to find the language of
367374
an element.
368375

369376
<P><span class="index-inst" title="conformance"><a
370-
href="conform.html#conformance">Conforming HTML user agents</a></span>
377+
href="conform.html#conformance">Conforming <!--HTML--> user agents</a></span>
371378
may consider the value of <span
372379
class="propinst-text-transform">'text-transform'</span> to be 'none'
373380
for characters that are not from the Latin-1 repertoire and for
@@ -379,7 +386,7 @@ that specified by the case-conversion tables of ISO 10646
379386
In this example, all text in an H1 element is transformed to uppercase
380387
text.
381388
<PRE>
382-
H1 { text-transform: uppercase }
389+
H1 { text-transform: uppercase }
383390
</PRE>
384391
</div>
385392

@@ -405,29 +412,32 @@ handled. Values have the following meanings:</P>
405412
<!-- See the HTML definition of whitespace -IJ -->
406413
<dl>
407414
<dt><strong>normal</strong>
408-
<dd>This value allows user agents to collapse sequences
409-
of whitespace. Line breaks may be created by characters
410-
or elements (e.g., the BR element in HTML).
415+
<dd>This value directs user agents to collapse sequences
416+
of whitespace, and break lines as necessary to fill line boxes.
417+
Additional line breaks may be created by occurrences of "\A" in
418+
generated content (e.g., for the BR element in HTML).
411419
<dt><strong>pre</strong>
412420
<dd>This value prevents user agents from collapsing sequences
413-
of whitespace.
421+
of whitespace. Lines are only broken at newlines in the source, or
422+
at occurences of "\A" in generated content.
414423
<dt><strong>nowrap</strong>
415-
<dd>This value suppresses line breaks within text
416-
except for those created by other elements (e.g., the
417-
BR element in HTML).
424+
<dd>This value collapses whitespace as for 'normal', but suppresses
425+
line breaks within text except for those created by "\A" in generated
426+
content (e.g., for the BR element in HTML).
418427
</dl>
419428

420429
<div class="example"><P> The following examples show what <a
421430
href="syndata.html#whitespace">whitespace</a> behavior is expected
422-
from the PRE and P elements in HTML.
431+
from the PRE and P elements, and the "nowrap" attribute in HTML.
423432
<PRE>
424-
PRE { white-space: pre }
425-
P { white-space: normal }
433+
PRE { white-space: pre }
434+
P { white-space: normal }
435+
TD[nowrap] { white-space: nowrap }
426436
</PRE>
427437
</div>
428438

429439
<P><span class="index-inst" title="conformance"><a
430-
href="conform.html#conformance">Conforming HTML user agents</a></span>
440+
href="conform.html#conformance">Conforming <!--HTML--> user agents</a></span>
431441
may <span class="index-inst" title="ignore"><a
432442
href="syndata.html#ignore">ignore</a></span> the <span
433443
class="propinst-white-space">'white-space'</span> property in author

0 commit comments

Comments
 (0)