Skip to content

Commit 4d56db4

Browse files
committed
[css2] Tantek added pre-wrap
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401960
1 parent 8727715 commit 4d56db4

1 file changed

Lines changed: 36 additions & 10 deletions

File tree

css2/text.src

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
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: text.src,v 2.29 2002-09-10 10:04:31 bbos Exp $ -->
4+
<!-- $Id: text.src,v 2.30 2002-10-21 14:35:19 bbos Exp $ -->
55
<head>
66
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
77
<title>Text</title>
8-
<!-- Changed by: Tantek Celik, 23-04-2002 -->
8+
<!-- Changed by: Tantek Celik, 2002-10-06 -->
9+
<style type="text/css">
10+
.current,.proposed { background:#feb }
11+
ins.proposed { background:#bfb }
12+
del.proposed { background:#fbb }
13+
body>del,body>ins {display:block}
14+
</style>
915
</head>
1016
<body>
1117
<h1>Text</h1>
@@ -53,6 +59,15 @@ p { text-indent: 3em }
5359
</pre>
5460
</div>
5561

62+
<ins class="proposed">
63+
<p class="note">
64+
Note: Since the 'text-indent' property inherits, when specified on
65+
a block element, it will affect descendent inline-block elements.
66+
For this reason, it is often wise to specify '<code>text-indent: 0</code>'
67+
on elements that are specified '<code>display:inline-block</code>'.
68+
</p>
69+
</ins>
70+
5671
<h2><a name="alignment-prop">Alignment:</a> the <span
5772
class="propinst-text-align">'text-align'</span> property</h2>
5873

@@ -79,11 +94,11 @@ class="propinst-word-spacing">'word-spacing'</span>.)
7994
<div class="example"><p>
8095
In this example, note that since <span
8196
class="propinst-text-align">'text-align'</span> is inherited, all
82-
block-level elements inside the DIV element with 'class=center' will
97+
block-level elements inside the DIV element with 'class=important' will
8398
have their inline content centered.
8499

85100
<pre>
86-
div.center { text-align: center }
101+
div.important { text-align: center }
87102
</pre>
88103
</div>
89104

@@ -288,26 +303,37 @@ handled. Values have the following meanings:</p>
288303
<dt>normal
289304
<dd>This value directs user agents to collapse sequences
290305
of whitespace, and break lines as necessary to fill line boxes.
291-
Additional line breaks may be created by occurrences of "\A" in
292-
generated content (e.g., for the BR element in HTML).
293306
<dt>pre
294307
<dd>This value prevents user agents from collapsing sequences
295308
of whitespace. Lines are only broken at newlines in the source, or
296309
at occurrences of "\A" in generated content.
297310
<dt>nowrap
298311
<dd>This value collapses whitespace as for 'normal', but suppresses
299-
line breaks within text except for those created by "\A" in generated
300-
content (e.g., for the BR element in HTML).
301-
312+
line breaks within text.
313+
<dt>pre-wrap
314+
<dd>This value prevents user agents from collapsing sequences
315+
of whitespace. Lines are broken at newlines in the source,
316+
at occurrences of "\A" in generated content,
317+
and as necessary to fill line boxes.
318+
<dt><span class="proposed">pre-line | pre-lines</span>
319+
<dd>This value collapses whitespace as for 'normal', except
320+
occurances of newlines in the source or "\A" in generated content
321+
do cause line breaks.
302322
</dl>
303323

304324
<div class="example"><p> The following examples show what <a
305325
href="syndata.html#whitespace">whitespace</a> behavior is expected
306-
from the PRE and P elements, and the "nowrap" attribute in HTML.
326+
from the PRE and P elements, the "nowrap" attribute in HTML, and
327+
in generated content.
307328
<pre>
308329
pre { white-space: pre }
309330
p { white-space: normal }
310331
td[nowrap] { white-space: nowrap }
332+
:before,:after { white-space: <span class="proposed">pre-line | pre-lines</span> }
333+
</pre>
334+
<p>In addition, the effect of an HTML PRE element with the <em>non-standard</em> "wrap" attribute is demonstrated by the following example:
335+
<pre>
336+
pre[wrap] { white-space: pre-wrap }
311337
</pre>
312338
</div>
313339

0 commit comments

Comments
 (0)