8000 [css-text] Revert pre-wrap-auto, revert changes to pre-wrap behavior,… · xfq/csswg-drafts@2355b45 · GitHub
Skip to content

Commit 2355b45

Browse files
committed
[css-text] Revert pre-wrap-auto, revert changes to pre-wrap behavior, adjust spec to allow MSIE behavior (which is the sanest).
1 parent 19e64a5 commit 2355b45

1 file changed

Lines changed: 13 additions & 40 deletions

File tree

css-text/Overview.bs

Lines changed: 13 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ At Risk: the <length> values of the 'tab-size' property
2121
At Risk: the 'text-justify' property
2222
At Risk: the percentage values of 'word-spacing'
2323
At Risk: the 'hanging-punctuation' property
24-
At Risk: the ''pre-wrap-auto'' value of the 'white-space' property
2524
Ignored Vars: letter-spacing
2625
</pre>
2726

@@ -439,7 +438,7 @@ Languages and Typesetting</h4>
439438
</tr>
440439
<tr>
441440
<th><a href="#values">Value</a>:
442-
<td>normal | pre | nowrap | pre-wrap | pre-wrap-auto | pre-line</td>
441+
<td>normal | pre | nowrap | pre-wrap | pre-line</td>
443442
</tr>
444443
<tr>
445444
<th>Initial:</th>
@@ -503,24 +502,11 @@ Languages and Typesetting</h4>
503502
<dt><dfn>pre-wrap</dfn></dt>
504503
<dd>Like ''pre'', this value preserves <a>white space</a>;
505504
but like ''white-space/normal'', it allows wrapping.
506-
<dt><dfn>pre-wrap-auto</dfn></dt>
507-
<dd>Like ''pre-wrap'', this value preserves <a>white space</a> and allows wrapping.
508-
However, some of the behavior is made UA dependent
509-
(See <a href="#white-space-rules">The White Space Processing Rules</a>
510-
for details).
511-
This flexibility allows UAs to match platform conventions,
512-
in particular with respect to multi-line editable text fields,
513-
and when preserved <a>white space</a> at the end a line
514-
would cause the line to overflow.
515505
<dt><dfn>pre-line</dfn></dt>
516506
<dd>Like ''white-space/normal'', this value collapses consecutive spaces and allows wrapping,
517507
but preserves <a>segment breaks</a> in the source as <a>forced line breaks</a>.
518508
</dl>
519509

520-
Issue: Suggestions of a better name for ''pre-wrap-auto'' are welcome.
521-
522-
Note: ''pre-wrap-auto'' is at risk.
523-
524510
<p>The following informative table summarizes the behavior of various
525511
'white-space' values:</p>
526512

@@ -560,12 +546,6 @@ Languages and Typesetting</h4>
560546
<td>Preserve</td>
561547
<td>Wrap</td>
562548
</tr>
563-
<tr>
564-
<th>''pre-wrap-auto''</th>
565-
<td>Preserve</td>
566-
<td>Preserve</td>
567-
<td>Wrap</td>
568-
</tr>
569549
<tr>
570550
<th>''pre-line''</th>
571551
<td>Preserve</td>
@@ -684,21 +664,9 @@ Languages and Typesetting</h4>
684664
invisible, but retains its <a>soft wrap opportunity</a>, if any.)</li>
685665
</ol>
686666
</li>
687-
<li><p>If 'white-space' is set to ''pre-wrap'',
688-
any sequence of spaces is preserved.
689-
This is achieved by treating it as a sequence of non-breaking spaces,
690-
except that a <a>soft wrap opportunity</a> exists
691-
between each of the spaces of this preserved sequence,
692-
as well as at the beginning
693-
and at the end of the sequence.</p></li>
694-
<li><p>If 'white-space' is set to ''pre-wrap-auto'',
695-
any sequence of spaces is preserved.
696-
This is achieved by treating it as a sequence of non-breaking spaces.
697-
However, unlike with ''pre-wrap'',
698-
whether <a>soft wrap opportunities</a> exist in this sequence
699-
is user-agent defined.
700-
These UA-specific rules may be context dependent.</p></li>
701-
</ul>
667+
<li><p>If 'white-space' is set to ''pre'' or ''pre-wrap'',
668+
any sequence of spaces is treated as a sequence of non-breaking spaces.
669+
However, a <a>soft wrap opportunity</a> exists at the end of the sequence.
702670

703671
<p>Then, the entire block is rendered. Inlines are laid out, taking bidi
704672
reordering into account, and <a>wrapping</a> as specified by the
@@ -742,7 +710,7 @@ Languages and Typesetting</h4>
742710
<h4 id="line-break-transform">
743711
Segment Break Transformation Rules</h4>
744712

745-
<p>When 'white-space' is ''pre'', ''pre-wrap'', ''pre-wrap-auto'', or ''pre-line'',
713+
<p>When 'white-space' is ''pre'', ''pre-wrap'', or ''pre-line'',
746714
<a>segment breaks</a> are not <a>collapsible</a>
747715
and are instead transformed into a preserved line feed (U+000A).
748716

@@ -782,9 +750,14 @@ Languages and Typesetting</h4>
782750
from the block's starting content edge.
783751
The tab size is given by the 'tab-size' property.
784752
<li>A sequence of <a>collapsible</a> spaces at the end of a line is removed.
785-
<li>If spaces or tabs at the end of a line are non-collapsible but
786-
have 'white-space' set to ''pre-wrap-auto'' the UA may visually
787-
collapse their character advance widths.
753+
<li>If spaces or tabs at the end of a line are non-collapsible
754+
but have 'white-space' set to ''pre-wrap''
755+
the UA may either <a>hang</a> the <a>white space</a>
756+
or visually collapse their character advance widths
757+
such that they don't take up space in the line.
758+
759+
Note: Hanging the white space rather than collapsing it
760+
allows users to see the space when selecting or editing text.
788761
</ol>
789762

790763
<p>White space that was not removed or collapsed during the white space

0 commit comments

Comments
 (0)