|
1 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | 2 | <html lang="en"> |
3 | | -<!-- $Id: text.src,v 1.14 1997-09-24 22:06:32 ian Exp $ --> |
| 3 | +<!-- $Id: text.src,v 1.15 1997-10-02 16:09:22 ian Exp $ --> |
4 | 4 | <HEAD> |
5 | 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
6 | 6 | <TITLE>Text</TITLE> |
|
13 | 13 | The properties defined in the following sections affect the visual |
14 | 14 | presentation of characters, spaces, words, and paragraphs. |
15 | 15 |
|
16 | | -<H2>White space</H2> |
| 16 | +<H2>Indentation</H2> |
17 | 17 |
|
18 | | -<H4><a name="propdef-white-space">'white-space'</a></H4> |
19 | | -<!-- #include src=properties/white-space.srb --> |
| 18 | +<H4><a name="propdef-text-indent">'text-indent'</a></H4> |
| 19 | +<!-- #include src=properties/text-indent.srb --> |
| 20 | + |
| 21 | +<P>The property specifies the indentation of the first line of text |
| 22 | +relative to the horizontal edge of the element's content. The |
| 23 | +indentation forms a blank space between the edge of the content and |
| 24 | +the first character of the first line. The property does not apply |
| 25 | +directly to text in a child element, however it will apply through |
| 26 | +inheritance if the property is not explicitly declared for the |
| 27 | +child. |
| 28 | + |
| 29 | +<P>The value of <span |
| 30 | +class="propinst-text-indent">'text-indent'</span> may be negative, but |
| 31 | +there may be implementation-specific limits. An indentation is not |
| 32 | +inserted when a line of text is broken by a child element (such as |
| 33 | +the BR element in HTML). |
20 | 34 |
|
21 | | -<P> This property declares how whitespace inside the element is |
22 | | -handled: the 'normal' way (where whitespace is collapsed), as 'pre' |
23 | | -(which behaves like the PRE element in HTML) or as 'nowrap' (where |
24 | | -wrapping is done only through elements that force line breaks such as |
25 | | - the BR element in HTML): |
26 | 35 |
|
27 | 36 | <div class="example"><P> |
28 | | -The following examples show what whitespace behavior is expected from |
29 | | - the PRE and P elements in HTML. |
30 | | - <PRE> |
31 | | - PRE { white-space: pre } |
32 | | - P { white-space: normal } |
| 37 | +The following example causes a 3em text indent. |
| 38 | + |
| 39 | +<PRE> |
| 40 | + P { text-indent: 3em } |
33 | 41 | </PRE> |
34 | 42 | </div> |
35 | 43 |
|
36 | | -<P> The initial value of 'white-space' is 'normal', but a UA will |
37 | | -typically have default values for each element. |
| 44 | +<H2>Alignment</H2> |
38 | 45 |
|
39 | | -<P> UAs may ignore the 'white-space' property in author's and reader's |
40 | | -style sheets, and use the UA's default values instead. See the section |
41 | | -on <a href="convent.html#conformance">conformance</a> for more information. |
| 46 | +<H4><a name="propdef-alignment">'alignment'</a></H4> |
| 47 | +<!-- #include src=properties/alignment.srb --> |
42 | 48 |
|
43 | | -<H2>Case</H2> |
| 49 | +<P> This property describes how text is aligned within the |
| 50 | +element. The actual justification algorithm used is UA and |
| 51 | +human-language dependent. |
44 | 52 |
|
45 | | -<H3>Capitalization</H3> |
| 53 | +<div class="example"><P> |
46 | 54 |
|
47 | | -<H4><a name="propdef-text-transform">'text-transform'</a></H4> |
48 | | -<!-- #include src=properties/text-transform.srb --> |
| 55 | +In this example, note that since <span |
| 56 | +class="propinst-text-align">'text-align'</span> inherits, all block |
| 57 | +level elements inside the DIV element with 'class=center' will be |
| 58 | +centered. Note that alignments are relative to the width of the |
| 59 | +element, not the canvas. If 'justify' is not supported, the UA will |
| 60 | +supply a replacement. Typically, this will be 'left' for western |
| 61 | +languages. |
49 | 62 |
|
50 | | -<P>The values of this property have the following meanings: |
| 63 | +<PRE> |
| 64 | + DIV.center { text-align: center } |
| 65 | +</PRE> |
| 66 | +</div> |
51 | 67 |
|
52 | | - <DL> |
53 | | - <DT> |
54 | | - 'capitalize' |
55 | | - <DD> |
56 | | - uppercases the first character of each word |
57 | | - <DT> |
58 | | - 'uppercase' |
59 | | - <DD> |
60 | | - uppercases all letters of the element |
61 | | - <DT> |
62 | | - 'lowercase' |
63 | | - <DD> |
64 | | - lowercases all letters of the element |
65 | | - <DT> |
66 | | - 'none' |
67 | | - <DD> |
68 | | - neutralizes inherited value. |
69 | | - </DL> |
| 68 | +<P> UAs may treat 'justify' as 'left' or 'right', depending on whether |
| 69 | +the element's default writing direction is left-to-right or |
| 70 | +right-to-left, respectively. |
70 | 71 |
|
71 | | -<P> The actual transformation in each case is human language |
72 | | -dependent. See <a rel="biblioentry" |
73 | | -href="./refs.html#ref-RFC2070">[RFC2070]</a> for ways to find the |
74 | | -language of an element. |
| 72 | +<H2>Decoration</H2> |
| 73 | +<H3>Underlining, over lining, striking, and blinking</H3> |
75 | 74 |
|
76 | | -<P> UAs may ignore <span |
77 | | -class="propinst-text-transform">'text-transform'</span> (i.e., treat |
78 | | -it as 'none') for characters that are not from the Latin-1 repertoire |
79 | | -and for elements in languages for which the transformation is |
80 | | -different from that specified by the case-conversion tables of <a |
81 | | -rel="biblioentry" href="./refs.html#ref-UNICODE">[UNICODE]</a>. |
| 75 | +<H4><a name="propdef-text-decoration">'text-decoration'</a></H4> |
| 76 | +<!-- #include src=properties/text-decoration.srb --> |
| 77 | + |
| 78 | +<P> This property describes decorations that are added to the text of |
| 79 | +an element. If the element has no text (e.g., the IMG element in |
| 80 | +HTML) or is an empty element (e.g., EM in HTML), this |
| 81 | +property has no effect. A value of 'blink' causes the text to blink. |
| 82 | + |
| 83 | +<P> The color(s) required for the text decoration should be derived |
| 84 | +from the <span class="propinst-color">'color'</span> property value. |
| 85 | + |
| 86 | +<P> This property is not inherited, but elements should match their |
| 87 | +parent. E.g., if an element is underlined, the line should span the |
| 88 | +child elements. The color of the underlining will remain the same even |
| 89 | +if descendant elements have different <span |
| 90 | +class="propinst-color">'color'</span> values. |
82 | 91 |
|
83 | 92 | <div class="example"><P> |
84 | | -In this example, all text in an H1 element is transformed to uppercase |
85 | | - text. |
86 | | -<PRE> |
87 | | - H1 { text-transform: uppercase } |
| 93 | +In the following example, all links are underlined |
| 94 | +(i.e., all 'A' elements with a 'HREF' attribute). |
| 95 | + |
| 96 | + <PRE> |
| 97 | + A:link, A:visited, A:active { text-decoration: underline } |
88 | 98 | </PRE> |
89 | 99 | </div> |
90 | 100 |
|
91 | | -<H3>Special first letter/first line</H3> |
| 101 | +<P>The value 'blink' causes the text to blink on output devices that |
| 102 | +can support blinking. |
92 | 103 |
|
93 | | -<P>Please consult the sections on <a |
94 | | -href="./selector.html#first-line">first line</a> and <a |
95 | | -href="./selector.html#first-letter">first letter</a> for information |
96 | | -on specially formatting the first letter or line of a paragraph. |
| 104 | +<H3>Text shadows</H3> |
97 | 105 |
|
| 106 | +<H4><a name="propdef-text-shadow-color">text-shadow-color'</a></H4> |
| 107 | +<!-- #include src=properties/text-shadow-color.srb --> |
| 108 | + |
| 109 | +<P>CSS2 allows authors to create text shadow effects with this |
| 110 | +property. |
| 111 | + |
| 112 | +<div class="example"><P> |
| 113 | +So, for example, the following rule: |
| 114 | + |
| 115 | +<PRE> |
| 116 | + P { text-shadow-color: black } |
| 117 | +</PRE> |
| 118 | + |
| 119 | +<P>creates a black text shadow down and to the right of the text. |
| 120 | +</div> |
| 121 | + |
| 122 | +<P>Text shadows increase the size of an element's box. |
| 123 | + |
| 124 | +<P><em>[Editor's note: The remaining sections of the text shadow |
| 125 | +proposal were not clear enough to be translated. More explanation |
| 126 | +is required.]</em> |
98 | 127 | <H2>Letter and word spacing</H2> |
99 | 128 |
|
100 | 129 | <H4><a name="propdef-letter-spacing">'letter-spacing'</a></H4> |
@@ -166,117 +195,88 @@ class="propinst-word-spacing">'word-spacing'</span> as 'normal'. See |
166 | 195 | the section on <a href="convent.html#conformance">conformance</a> for |
167 | 196 | more information. |
168 | 197 |
|
169 | | -<H2>Indentation</H2> |
170 | | - |
171 | | -<H4><a name="propdef-text-indent">'text-indent'</a></H4> |
172 | | -<!-- #include src=properties/text-indent.srb --> |
173 | | - |
174 | | -<P>The property specifies the indentation of the first line of text |
175 | | -relative to the horizontal edge of the element's content. The |
176 | | -indentation forms a blank space between the edge of the content and |
177 | | -the first character of the first line. The property does not apply |
178 | | -directly to text in a child element, however it will apply through |
179 | | -inheritance if the property is not explicitly declared for the |
180 | | -child. |
181 | | - |
182 | | -<P>The value of <span |
183 | | -class="propinst-text-indent">'text-indent'</span> may be negative, but |
184 | | -there may be implementation-specific limits. An indentation is not |
185 | | -inserted when a line of text is broken by a child element (such as |
186 | | -the BR element in HTML). |
187 | 198 |
|
| 199 | +<H2>Case</H2> |
188 | 200 |
|
189 | | -<div class="example"><P> |
190 | | -The following example causes a 3em text indent. |
191 | | - |
192 | | -<PRE> |
193 | | - P { text-indent: 3em } |
194 | | -</PRE> |
195 | | -</div> |
| 201 | +<H3>Capitalization</H3> |
196 | 202 |
|
197 | | -<H2>Alignment</H2> |
| 203 | +<H4><a name="propdef-text-transform">'text-transform'</a></H4> |
| 204 | +<!-- #include src=properties/text-transform.srb --> |
198 | 205 |
|
199 | | -<H4><a name="propdef-alignment">'alignment'</a></H4> |
200 | | -<!-- #include src=properties/alignment.srb --> |
| 206 | +<P>The values of this property have the following meanings: |
201 | 207 |
|
202 | | -<P> This property describes how text is aligned within the |
203 | | -element. The actual justification algorithm used is UA and |
204 | | -human-language dependent. |
| 208 | + <DL> |
| 209 | + <DT> |
| 210 | + 'capitalize' |
| 211 | + <DD> |
| 212 | + uppercases the first character of each word |
| 213 | + <DT> |
| 214 | + 'uppercase' |
| 215 | + <DD> |
| 216 | + uppercases all letters of the element |
| 217 | + <DT> |
| 218 | + 'lowercase' |
| 219 | + <DD> |
| 220 | + lowercases all letters of the element |
| 221 | + <DT> |
| 222 | + 'none' |
| 223 | + <DD> |
| 224 | + neutralizes inherited value. |
| 225 | + </DL> |
205 | 226 |
|
206 | | -<div class="example"><P> |
| 227 | +<P> The actual transformation in each case is human language |
| 228 | +dependent. See <a rel="biblioentry" |
| 229 | +href="./refs.html#ref-RFC2070">[RFC2070]</a> for ways to find the |
| 230 | +language of an element. |
207 | 231 |
|
208 | | -In this example, note that since <span |
209 | | -class="propinst-text-align">'text-align'</span> inherits, all block |
210 | | -level elements inside the DIV element with 'class=center' will be |
211 | | -centered. Note that alignments are relative to the width of the |
212 | | -element, not the canvas. If 'justify' is not supported, the UA will |
213 | | -supply a replacement. Typically, this will be 'left' for western |
214 | | -languages. |
| 232 | +<P> UAs may ignore <span |
| 233 | +class="propinst-text-transform">'text-transform'</span> (i.e., treat |
| 234 | +it as 'none') for characters that are not from the Latin-1 repertoire |
| 235 | +and for elements in languages for which the transformation is |
| 236 | +different from that specified by the case-conversion tables of <a |
| 237 | +rel="biblioentry" href="./refs.html#ref-UNICODE">[UNICODE]</a>. |
215 | 238 |
|
| 239 | +<div class="example"><P> |
| 240 | +In this example, all text in an H1 element is transformed to uppercase |
| 241 | + text. |
216 | 242 | <PRE> |
217 | | - DIV.center { text-align: center } |
| 243 | + H1 { text-transform: uppercase } |
218 | 244 | </PRE> |
219 | 245 | </div> |
220 | 246 |
|
221 | | -<P> UAs may treat 'justify' as 'left' or 'right', depending on whether |
222 | | -the element's default writing direction is left-to-right or |
223 | | -right-to-left, respectively. |
224 | | - |
225 | | -<H2>Decoration</H2> |
226 | | -<H3>Underlining, over lining, striking, and blinking</H3> |
| 247 | +<H3>Special first letter/first line</H3> |
227 | 248 |
|
228 | | -<H4><a name="propdef-text-decoration">'text-decoration'</a></H4> |
229 | | -<!-- #include src=properties/text-decoration.srb --> |
| 249 | +<P>Please consult the sections on <a |
| 250 | +href="./selector.html#first-line">first line</a> and <a |
| 251 | +href="./selector.html#first-letter">first letter</a> for information |
| 252 | +on specially formatting the first letter or line of a paragraph. |
230 | 253 |
|
231 | | -<P> This property describes decorations that are added to the text of |
232 | | -an element. If the element has no text (e.g., the IMG element in |
233 | | -HTML) or is an empty element (e.g., EM in HTML), this |
234 | | -property has no effect. A value of 'blink' causes the text to blink. |
| 254 | +<H2>White space</H2> |
235 | 255 |
|
236 | | -<P> The color(s) required for the text decoration should be derived |
237 | | -from the <span class="propinst-color">'color'</span> property value. |
| 256 | +<H4><a name="propdef-white-space">'white-space'</a></H4> |
| 257 | +<!-- #include src=properties/white-space.srb --> |
238 | 258 |
|
239 | | -<P> This property is not inherited, but elements should match their |
240 | | -parent. E.g., if an element is underlined, the line should span the |
241 | | -child elements. The color of the underlining will remain the same even |
242 | | -if descendant elements have different <span |
243 | | -class="propinst-color">'color'</span> values. |
| 259 | +<P> This property declares how whitespace inside the element is |
| 260 | +handled: the 'normal' way (where whitespace is collapsed), as 'pre' |
| 261 | +(which behaves like the PRE element in HTML) or as 'nowrap' (where |
| 262 | +wrapping is done only through elements that force line breaks such as |
| 263 | + the BR element in HTML): |
244 | 264 |
|
245 | 265 | <div class="example"><P> |
246 | | -In the following example, all links are underlined |
247 | | -(i.e., all 'A' elements with a 'HREF' attribute). |
248 | | - |
| 266 | +The following examples show what whitespace behavior is expected from |
| 267 | + the PRE and P elements in HTML. |
249 | 268 | <PRE> |
250 | | - A:link, A:visited, A:active { text-decoration: underline } |
251 | | -</PRE> |
252 | | -</div> |
253 | | - |
254 | | -<P>The value 'blink' causes the text to blink on output devices that |
255 | | -can support blinking. |
256 | | - |
257 | | -<H3>Text shadows</H3> |
258 | | - |
259 | | -<H4><a name="propdef-text-shadow-color">text-shadow-color'</a></H4> |
260 | | -<!-- #include src=properties/text-shadow-color.srb --> |
261 | | - |
262 | | -<P>CSS2 allows authors to create text shadow effects with this |
263 | | -property. |
264 | | - |
265 | | -<div class="example"><P> |
266 | | -So, for example, the following rule: |
267 | | - |
268 | | -<PRE> |
269 | | - P { text-shadow-color: black } |
| 269 | + PRE { white-space: pre } |
| 270 | + P { white-space: normal } |
270 | 271 | </PRE> |
271 | | - |
272 | | -<P>creates a black text shadow down and to the right of the text. |
273 | 272 | </div> |
274 | 273 |
|
275 | | -<P>Text shadows increase the size of an element's box. |
| 274 | +<P> The initial value of 'white-space' is 'normal', but a UA will |
| 275 | +typically have default values for each element. |
276 | 276 |
|
277 | | -<P><em>[Editor's note: The remaining sections of the text shadow |
278 | | -proposal were not clear enough to be translated. More explanation |
279 | | -is required.]</em> |
| 277 | +<P> UAs may ignore the 'white-space' property in author's and reader's |
| 278 | +style sheets, and use the UA's default values instead. See the section |
| 279 | +on <a href="convent.html#conformance">conformance</a> for more information. |
280 | 280 |
|
281 | 281 | <H2>Generated text</H2> |
282 | 282 | <em>This is a placeholder.</em> |
|
0 commit comments