-
Notifications
You must be signed in to change notification settings - Fork 794
Expand file tree
/
Copy pathtext.src
More file actions
336 lines (275 loc) · 11.4 KB
/
text.src
File metadata and controls
336 lines (275 loc) · 11.4 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html lang="en">
<!-- $Id: text.src,v 2.27 2002-04-23 23:28:15 bbos Exp $ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Text</title>
<!-- Changed by: Tantek Celik, 23-04-2002 -->
</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>This property specifies the indentation of the first line of text
in a 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"><length></span></span>
<dd>The indentation is a fixed length.
<dt><span class="index-inst" title="<percentage>"><span
class="value-inst-percentage"><percentage>
</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. If the value of <span
class="propinst-text-indent">'text-indent'</span> is negative, the
value of <span class="propinst-overflow">'overflow'</span> will affect
whether the text is visible.
<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 inline content of a block is aligned. Values
have the following meanings:</p>
<dl>
<dt>left, right, center, justify
<dd>Left, right, center, and justify text, respectively.
<dt><span class="index-inst" title="<string>"><span
class="value-inst-string"><string></span></span>
<dd>Specifies a string on which cells in a table column will
align (see the section on <a href="tables.html#column-alignment">
horizontal alignment in a column</a> for details and an example).
This value applies <em>only</em> to <a href="tables.html">table</a>
cells. If set on other elements, it will be treated as 'left' or
'right', depending on whether <span
class="propinst-direction">'direction'</span> is 'ltr', or 'rtl',
respectively.
</dl>
<p>A block of text is a stack of <a href="visuren.html#line-box">line
boxes</a>. In the case of 'left', 'right' and 'center', this property specifies
how the inline boxes within each line box align with respect to the line
box's left and right sides; alignment is not with respect to the <a
href="visuren.html#viewport">viewport</a>. In the case of 'justify',
the UA may stretch the inline boxes in addition to adjusting their
positions. (See also <span
class="propinst-letter-spacing">'letter-spacing'</span> and <span
class="propinst-word-spacing">'word-spacing'</span>.)
<div class="example"><p>
In this example, note that since <span
class="propinst-text-align">'text-align'</span> is inherited, all
block-level elements inside the DIV element with 'class=center' will
have their inline content 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 written language
dependent.</em>
<p><em><span class="index-inst" title="conformance"><a
href="conform.html#conformance">Conforming 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, overlining, 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-level descendants of the element. If it is specified for (or
affects) an <a href="visuren.html#inline-level">inline-level</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#ignore">ignore</a> this property.
<p>Values have the following meanings:</p>
<dl>
<dt>none
<dd>Produces no text decoration.
<dt>underline
<dd>Each line of text is underlined.
<dt>overline
<dd>Each line of text has a line above it.
<dt>line-through
<dd>Each line of text has a line through the middle
<dt>blink
<dd>Text blinks (alternates between visible and invisible).
<a href="conform.html#conformance">Conforming user agents</a>
may simply not blink the text. Note that not blinking the text
is one technique to satisfy
<a href="http://www.w3.org/TR/UAAG/guidelines.html#tech-on-off-blinking-text">checkpoint 3.3 of WAI-UAAG</a>.
</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 box should be formatted 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[href] { text-decoration: underline }
</pre>
</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>normal
<dd>The spacing is the normal spacing for the current font.
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"><length></span></span>
<dd>This value indicates inter-character space <em>in
addition to</em> the default space between
characters. Values may be negative, but there may be
implementation-specific limits.
User agents may not further increase or decrease the inter-character
space in order to justify text.
</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>In the following example, the user agent is not permitted
to alter inter-character space:</p>
<pre>
blockquote { letter-spacing: 0cm } /* Same as '0' */
</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>
<!-- #include src=properties/word-spacing.srb -->
<p>This property specifies spacing behavior between words.
Values have the following meanings:</p>
<dl>
<dt>normal
<dd>The normal inter-word space, as defined by the current font and/or
the UA.
<dt><span class="index-inst" title="<length>"><span
class="value-inst-length"><length></span></span>
<dd>This value indicates inter-word space <em>in
addition to</em> 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 is
also 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>
<h2><a name="caps-prop">Capitalization</a>: the <span
class="propinst-text-transform">'text-transform'</span> property</h2>
<!-- #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>capitalize
<dd>Puts the first character of each word in uppercase.
<dt>uppercase
<dd>Puts all characters of each word in uppercase.
<dt>lowercase
<dd>Puts all characters of each word in lowercase.
<dt>none
<dd>No capitalization effects.
</dl>
<p> The actual transformation in each case is written language
dependent. See RFC 2070 ([[RFC2070]]) for ways to find the language of
an element.
<p><span class="index-inst" title="conformance"><a
href="conform.html#conformance">Conforming 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 ISO 10646
([[ISO10646]]).
<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>
<h2><a name="white-space-prop">Whitespace</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 whitespace -IJ -->
<dl>
<dt>normal
<dd>This value directs user agents to collapse sequences
of whitespace, and break lines as necessary to fill line boxes.
Additional line breaks may be created by occurrences of "\A" in
generated content (e.g., for the BR element in HTML).
<dt>pre
<dd>This value prevents user agents from collapsing sequences
of whitespace. Lines are only broken at newlines in the source, or
at occurrences of "\A" in generated content.
<dt>nowrap
<dd>This value collapses whitespace as for 'normal', but suppresses
line breaks within text except for those created by "\A" in generated
content (e.g., for 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, and the "nowrap" attribute in HTML.
<pre>
pre { white-space: pre }
p { white-space: normal }
td[nowrap] { white-space: nowrap }
</pre>
</div>
</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:
-->