-
Notifications
You must be signed in to change notification settings - Fork 790
Expand file tree
/
Copy pathtext.src
More file actions
453 lines (369 loc) · 15.6 KB
/
text.src
File metadata and controls
453 lines (369 loc) · 15.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<!-- $Id: text.src,v 2.0 1998-02-02 18:49:02 bbos Exp $ -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>Text</TITLE>
</HEAD>
<BODY>
<H1 align="center">Text</H1>
<P>The properties defined in the following sections affect the visual
presentation of characters, spaces, words, and paragraphs.
<H2><a name="indentation-prop">Indentation</a>: the <span
class="propinst-text-indent">'text-indent'</span> property</H2>
<!-- #include src=properties/text-indent.srb -->
<P>The property, which only applies to <a
href="visuren.html#block-level">block-level</a> elements that contain
<a href="visuren.html#inline">inline</a> elements, specifies the
indentation of the first line of text in the block. More precisely, it
specifies the indentation of the first box that flows into the block's
first <a href="visuren.html#line-box">line box</a>. The box is
indented with respect to the left (or right, for right-to-left layout)
edge of the line box. User agents should render this indentation as
blank space.
<P>Values have the following meanings:</P>
<dl>
<dt><span class="index-inst" title="<length>"><span
class="value-inst-length"><strong><length></strong></span></span>
<dd>The indentation is a fixed length.
<dt><span class="index-inst" title="<percentage>"><span
class="value-inst-percentage"><strong><percentage></strong>
</span></span>
<dd>The indentation is a percentage of the containing
block width.
</dl>
<P>The value of <span
class="propinst-text-indent">'text-indent'</span> may be negative, but
there may be implementation-specific limits. A line is not indented
if the previous line was broken explicitly (e.g., the BR
element in HTML).
<div class="example"><P>
The following example causes a 3em text indent.
<PRE>
P { text-indent: 3em }
</PRE>
</div>
<H2><a name="alignment-prop">Alignment</a> the <span
class="propinst-text-align">'text-align'</span> property</H2>
<!-- #include src=properties/text-align.srb -->
<P> This property describes how a paragraph of text is aligned. More
precisely, it specifies how boxes in each <a
href="visuren.html#line-box">line box</a> of a block align width
respect to the line box. (Note that alignment is not with respect to
the <a href="visuren.html#viewport">viewport</a> but the current <a
href="visuren.html#containing-block">containing block</a>.)
<div class="example"><P>
In this example, note that since <span
class="propinst-text-align">'text-align'</span> inherits, all
block-level elements inside the DIV element with 'class=center' will
be centered.
<PRE>
DIV.center { text-align: center }
</PRE>
</div>
<div class="note"><P>
<em><strong>Note.</strong>
The actual justification algorithm used is user-agent and human-language
dependent.</em>
<P><em><span class="index-inst" title="conformance"><a
href="conform.html#conformance">Conforming HTML user agents</a></span> may
interpret the value 'justify' as 'left' or 'right', depending on
whether the element's default writing direction is left-to-right or
right-to-left, respectively.</em>
</div>
<H2>Decoration</H2>
<H3><a name="lining-striking-props">Underlining, over lining, striking, and
blinking</a>: the <span
class="propinst-text-decoration">'text-decoration'</span>
property</H3>
<!-- #include src=properties/text-decoration.srb -->
<P> This property describes decorations that are added to the text of
an element. If the property is specified for a <a
href="visuren.html#block-level">block-level</a> element, it affects
all inline children. If it is specified for (or affects) an <a
href="visuren.html#inline">inline</a> element, it affects all boxes
generated by the element. If the element has no content or no text
content (e.g., the IMG element in HTML), user agents must <a
href="syndata.html#skip">skip</a> this property.
<P>Values have the following meanings:</p>
<dl>
<dt><strong>none</strong>
<dd>Produces no text decoration.
<dt><strong>underline</strong>
<dd>Each line of text is underlined.
<dt><strong>overline</strong>
<dd>Each line of text has a line above it.
<dt><strong>line-through</strong>
<dd>Each line of text has a line through the middle
<dt><strong>blink</strong>
<dd>Text blinks (alternates between visible and invisible).
<a href="conform.html#conformance">Conforming user agents</a>
are not required to support this value.
</dl>
<P> The color(s) required for the text decoration should be derived
from the <span class="propinst-color">'color'</span> property value.
<P> This property is not inherited, but descendant boxes of a
block-level box should be rendered with the same decoration (e.g.,
they should all be underlined). The color of decorations should remain
the same even if descendant elements have different <span
class="propinst-color">'color'</span> values.
<div class="example"><P>
In the following example for HTML, the text content of all
A elements acting as hyperlinks will be underlined:</p>
<PRE>
A:link, A:visited, A:active { text-decoration: underline }
</PRE>
</div>
<H3><a name="text-shadow-props">Text shadows</a>: the <span
class="propinst-text-shadow">'text-shadow'</span> property</H3>
<!-- #include src=properties/text-shadow.srb -->
<P>The 'text-shadow' property accepts a comma-separated list of shadow
effects to be applied to the text of the element. The shadow effects
are applied in the order specified and may thus overlay each other,
but they will never overlay the text itself. Shadow effects do not
alter the size of the element, but may extend beyond its boundaries.
The <A href="visuren.html#stack-level">Z-order</a> of the shadow
effects is the same as for the element itself.
<P>Each shadow effect must specify a shadow offset and may optionally
specify a blur radius and a shadow color.
<P>A shadow offset is specified with two <span class="index-inst"
title="<length>"><span
class="value-inst-length"><length></span></span> values that
indicate the distance from the text. The first length value
specifies the horizontal distance to the right of the text. A negative
horizontal length value places the shadow to the left of the text. The
second length value specifies the vertical distance below the text. A
negative vertical length value places the shadow above the text.
<P>A blur radius may optionally be specified after the shadow offset.
The blur radius is a length value that indicates the boundaries of the
blur effect. The exact algorithm for computing the blur effect is not
specified.
<P>A color value may optionally be specified before or after the
length values of the shadow effect. The color value will be used as
the basis for the shadow effect. If no color is specified, the value
of the <span class="propinst-color">'color'</span> property will be
used instead.
<div class="example">
<P>The example below will set a text shadow to the right and below the
element's text. Since no color has been specified, the shadow will
have the same color as the element itself, and since no blur radius is
specified, the text shadow will not be blurred:</p>
<PRE>
H1 { text-shadow: 0.2em 0.2em }
</PRE>
<P>The next example will place a shadow to the right and below
the element's text. The shadow will have a 5px blur radius and will be
red.
<PRE>
H2 { text-shadow: 3px 3px 5px red }
</PRE>
<P>The next example specifies a list of shadow effects. The first
shadow will be to the right and below the element's text and will be
red with no blurring. The second shadow will overlay the first shadow
effect, and it will be yellow, blurred, and placed to the left and
below the text. The third shadow effect will be placed to the right
and above the text. Since no shadow color is specified for the third
shadow effect, the value of the element's <span
class="propinst-color">'color'</span>
property will be used:</p>
<PRE>
H2 { text-shadow: 3px 3px red, yellow -3px 3px 2px, 3px -3px }
</PRE>
</DIV>
<div class="example">
<P>Consider this example:
<PRE>
SPAN.glow {
background: white;
color: white;
text-shadow: black 0px 0px 5px;
}
</PRE>
<P>Here, the <span class="propinst-background">'background'</span> and
<span class="propinst-color">'color'</span> properties have the same
value and the <span class="propinst-text-shadow">'text-shadow'</span>
property is used to create a "solar eclipse" effect:</p>
<P><IMG SRC="images/eclipse-outline.gif" alt="Solar eclipse effect"></p>
</DIV>
<div class="note"><P>
<em><strong>Note.</strong>
This property is not defined in CSS1. Some shadow
effects may render text invisible in UAs that only support CSS1.
</em>
</div>
<H2><a name="spacing-props">Letter and word spacing</a>: the <span
class="propinst-letter-spacing">'letter-spacing'</span> and <span
class="propinst-word-spacing">'word-spacing'</span> properties</H2>
<!-- #include src=properties/letter-spacing.srb -->
<P>This property specifies spacing behavior between
text characters. Values have the following meanings:</P>
<dl>
<dt><strong>normal</strong>
<dd>This value allows the user agent to alter the space
between characters in order to justify text.
<dt><span class="index-inst" title="<length>"><span
class="value-inst-length"><strong><length></strong></span></span>
<dd>This value indicates inter-character space in
addition to the default space between
characters. Values may be negative, but there may be
implementation-specific limits.
<dt><strong>auto</strong>
<dd><!-- proposed -->
This value tells the user agent to adjust the spacing
between characters so that the entire text of an element fits on one
line. This value should only be used with special elements (e.g.,
headlines). See also the <span
class="propinst-font-size">'font-size'</span> property for related
'auto' behavior.
<!-- end proposed -->
</dl>
<P>Character spacing algorithms are user agent-dependent. Character
spacing may also be influenced by justification (see the <span
class="propinst-text-align">'text-align'</span> property).
<div class="example"><P>
In this example, the space between characters in
BLOCKQUOTE elements is increased by '0.1em'.
<PRE>
BLOCKQUOTE { letter-spacing: 0.1em }
</PRE>
<P>This will not happen if <span
class="propinst-letter-spacing">'letter-spacing'</span> is explicitly
set to a <span class="value-inst-length"><length></span> value,
as in:
<PRE>
BLOCKQUOTE { letter-spacing: 0 }
BLOCKQUOTE { letter-spacing: 0cm }
</PRE>
</div>
<P> When the resultant space between two characters is not the same as
the default space, user agents should not use
<span class="index-inst" title="ligatures">ligatures</span>
<P><span class="index-inst" title="conformance"><a
href="conform.html#conformance">Conforming HTML user agents</a></span>
may consider the value of the <span
class="propinst-letter-spacing">'letter-spacing'</span> property to be
'normal'.
<!-- #include src=properties/word-spacing.srb -->
<P>This property specifies spacing behavior between words.
Values have the following meanings:</p>
<dl>
<dt><strong>normal</strong>
<dd>This value allows the user agent to alter the space
between words in order to justify text.
<dt><span class="index-inst" title="<length>"><span
class="value-inst-length"><strong><length></strong></span></span>
<dd>This value indicates inter-word space in
addition to the default space between
words. Values may be negative, but there may be
implementation-specific limits.
</dl>
<P>Word spacing algorithms are user agent-dependent. Word spacing may
also be influenced by justification (see the <span
class="propinst-text-align">'text-align'</span> property).
<div class="example"><P>
In this example, the word-spacing between each word in H1 elements is
increased by '1em'.
<PRE>
H1 { word-spacing: 1em }
</PRE>
</div>
<P><span class="index-inst" title="conformance"><a
href="conform.html#conformance">Conforming HTML user agents</a></span> may
consider the value of the <span
class="propinst-word-spacing">'word-spacing'</span> property to be
'normal'.
<H2>Case</H2>
<H3><a name="caps-prop">Capitalization</a>: the <span
class="propinst-text-transform">'text-transform'</span> property</H3>
<!-- #include src=properties/text-transform.srb -->
<P>This property controls capitalization effects of
an element's text. Values have the following meanings:</p>
<DL>
<DT><strong>capitalize</strong>
<DD>Puts the first character of each word in uppercase.
<DT><strong>uppercase</strong>
<DD>Puts all characters of each word in uppercase.
<DT><strong>lowercase</strong>
<DD>Puts all characters of each word in lowercase.
<DT><strong>none</strong>
<DD>No capitalization effects.
</DL>
<P> The actual transformation in each case is human language-
dependent. See <a rel="biblioentry" href="./refs.html#ref-RFC2070"
class="normref">[RFC2070]</a> for ways to find the language of an
element.
<P><span class="index-inst" title="conformance"><a
href="conform.html#conformance">Conforming HTML user agents</a></span> may
consider the value of <span
class="propinst-text-transform">'text-transform'</span> to be 'none'
for characters that are not from the Latin-1 repertoire and for
elements in languages for which the transformation is different from
that specified by the case-conversion tables of <a rel="biblioentry"
href="./refs.html#ref-UNICODE" class="normref">[UNICODE]</a>.
<div class="example"><P>
In this example, all text in an H1 element is transformed to uppercase
text.
<PRE>
H1 { text-transform: uppercase }
</PRE>
</div>
<H3>Special first letter/first line</H3>
<P>Please consult the sections on <a
href="./selector.html#first-line">first line</a> and <a
href="./selector.html#first-letter">first letter</a> for information
on specially formatting the first letter or line of a paragraph.
<H2><a name="white-space-prop">White space</a>: the <span
class="propinst-white-space">'white-space'</span> property</H2>
<!-- #include src=properties/white-space.srb -->
<P> This property declares how <a
href="syndata.html#whitespace">whitespace</a> inside the element is
handled. Values have the following meanings:</P>
<!-- See the HTML definition of white space -IJ -->
<dl>
<dt><strong>normal</strong>
<dd>This value allows user agents to collapse sequences
of white space. Line breaks may be created by characters
or elements (e.g., the BR element in HTML).
<dt><strong>pre</strong>
<dd>This value prevents user agents from collapsing sequences
of white space.
<dt><strong>nowrap</strong>
<dd>This value suppresses line breaks within text
except for those created by other elements (e.g., the
BR element in HTML).
</dl>
<div class="example"><P> The following examples show what <a
href="syndata.html#whitespace">whitespace</a> behavior is expected
from the PRE and P elements in HTML.
<PRE>
PRE { white-space: pre }
P { white-space: normal }
</PRE>
</div>
<P><span class="index-inst" title="conformance"><a
href="conform.html#conformance">Conforming HTML user agents</a></span>
may <span class="index-inst" title="skip"><a
href="syndata.html#skip">skip</a></span> the <span
class="propinst-white-space">'white-space'</span> property in author
and user style sheets but must specify a value for it in the default
style sheet.
<H2>Text in HTML</H2>
<H3>Forcing a line break</H3>
<!-- Is this still true? -IJ -->
<P> The current CSS2 properties and values cannot describe the
behavior of the BR element; the BR element specifies a line break
between words. In effect, the element is replaced by a line
break. Future versions of CSS may handle added and replaced content,
but CSS2-based formatters must treat BR specially.
</BODY>
</HTML>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-declaration:"~/SGML/HTML4.decl"
sgml-default-doctype-name:"html"
sgml-minimize-attributes:t
sgml-nofill-elements:("pre" "style" "br")
sgml-live-element-indicator:t
End:
-->