Skip to content

Commit 0287371

Browse files
committed
[css-text] Line breaking details moved to before word-break <http://dev.w3.org/csswg/css-text/issues-lc-2013#issue-52>
1 parent 6d4beb9 commit 0287371

2 files changed

Lines changed: 89 additions & 89 deletions

File tree

css-text/Overview.bs

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,47 @@ Languages and Typesetting</h4>
805805
much appreciated.
806806
</div>
807807

808+
<h3 id="line-break-details">
809+
Line Breaking Details</h3>
810+
811+
<p>When determining <i>line breaks</i>:
812+
<ul>
813+
<li>Regardless of the 'white-space' value,
814+
lines always break at each <i>preserved</i> forced break character:
815+
for all values, line-breaking behavior defined for
816+
the BK, CR, LF, CM, NL, and SG line breaking classes in [[!UAX14]]
817+
must be honored.
818+
<li>When 'white-space' allows wrapping,
819+
line breaking behavior defined for the WJ, ZW, and GL line-breaking classes in [[!UAX14]]
820+
must be honored.
821+
<li>UAs that allow wrapping at punctuation other than spaces should prioritize breakpoints.
822+
For example, if breaks after slashes are given a lower priority than spaces,
823+
the sequence "check /etc" will never break between the "/" and the "e".
824+
As long as care is taken to avoid such awkward breaks, allowing breaks at
825+
appropriate punctuation other than spaces is recommended, as it results
826+
in more even-looking margins, particularly in narrow measures.
827+
The UA may use the width of the containing block, the text's language,
828+
and other factors in assigning priorities.
829+
<li>Out-of-flow elements do not introduce a <i>forced line break</i>
830+
or <i>soft wrap opportunity</i> in the flow.
831+
<li>The line breaking behavior of a replaced element or other atomic inline
832+
is equivalent to that of the Object Replacement Character (U+FFFC)
833+
and introduces a <i>soft wrap opportunity</i> both before and after itself.
834+
For Web-compatibility, this rule take precedence over <code>WJ</code> and <code>GL</code> handling;
835+
in terms of [[!UAX14]],
836+
this shifts the <code>CB</code> rule (<a href="http://www.unicode.org/reports/tr14/#LB20"><code>LB20</code></a>)
837+
immediately above the <code>WJ</code> and <code>GL</code> rules (<a href="http://www.unicode.org/reports/tr14/#LB11"><code>LB11</code></a>/<a href="http://www.unicode.org/reports/tr14/#LB12"><code>LB12</code></a>).
838+
<li>For <i>soft wrap opportunities</i> created by characters that disappear at the line break (e.g. U+0020 SPACE),
839+
properties on the element containing that character control the line breaking at that opportunity.
840+
For <i>soft wrap opportunities</i> defined by the boundary between two characters,
841+
the properties on the element containing the boundary control breaking.
842+
<!-- http://lists.w3.org/Archives/Public/www-style/2008Dec/0043.html -->
843+
<li>For <i>soft wrap opportunities</i> before the first or after the last character of a box,
844+
the break occurs immediately before/after the box (at its margin edge)
845+
rather than breaking the box between its content edge and the content.
846+
<li>Line breaking in/around Ruby is defined in Ruby box and line breaking [[!CSS3RUBY]].
847+
</ul>
848+
808849
<h3 id="word-break-property">
809850
Breaking Rules for Letters: the 'word-break' property</h3>
810851

@@ -933,47 +974,6 @@ Languages and Typesetting</h4>
933974
due to ''break-all'', the characters must still be shaped as if the
934975
word were not broken.</p>
935976

936-
<h3 id="line-break-details">
937-
Line Breaking Details</h3>
938-
939-
<p>When determining <i>line breaks</i>:
940-
<ul>
941-
<li>Regardless of the 'white-space' value,
942-
lines always break at each <i>preserved</i> forced break character:
943-
for all values, line-breaking behavior defined for
944-
the BK, CR, LF, CM, NL, and SG line breaking classes in [[!UAX14]]
945-
must be honored.
946-
<li>When 'white-space' allows wrapping,
947-
line breaking behavior defined for the WJ, ZW, and GL line-breaking classes in [[!UAX14]]
948-
must be honored.
949-
<li>UAs that allow wrapping at punctuation other than spaces should prioritize breakpoints.
950-
For example, if breaks after slashes are given a lower priority than spaces,
951-
the sequence "check /etc" will never break between the "/" and the "e".
952-
As long as care is taken to avoid such awkward breaks, allowing breaks at
953-
appropriate punctuation other than spaces is recommended, as it results
954-
in more even-looking margins, particularly in narrow measures.
955-
The UA may use the width of the containing block, the text's language,
956-
and other factors in assigning priorities.
957-
<li>Out-of-flow elements do not introduce a <i>forced line break</i>
958-
or <i>soft wrap opportunity</i> in the flow.
959-
<li>The line breaking behavior of a replaced element or other atomic inline
960-
is equivalent to that of the Object Replacement Character (U+FFFC)
961-
and introduces a <i>soft wrap opportunity</i> both before and after itself.
962-
For Web-compatibility, this rule take precedence over <code>WJ</code> and <code>GL</code> handling;
963-
in terms of [[!UAX14]],
964-
this shifts the <code>CB</code> rule (<a href="http://www.unicode.org/reports/tr14/#LB20"><code>LB20</code></a>)
965-
immediately above the <code>WJ</code> and <code>GL</code> rules (<a href="http://www.unicode.org/reports/tr14/#LB11"><code>LB11</code></a>/<a href="http://www.unicode.org/reports/tr14/#LB12"><code>LB12</code></a>).
966-
<li>For <i>soft wrap opportunities</i> created by characters that disappear at the line break (e.g. U+0020 SPACE),
967-
properties on the element containing that character control the line breaking at that opportunity.
968-
For <i>soft wrap opportunities</i> defined by the boundary between two characters,
969-
the properties on the element containing the boundary control breaking.
970-
<!-- http://lists.w3.org/Archives/Public/www-style/2008Dec/0043.html -->
971-
<li>For <i>soft wrap opportunities</i> before the first or after the last character of a box,
972-
the break occurs immediately before/after the box (at its margin edge)
973-
rather than breaking the box between its content edge and the content.
974-
<li>Line breaking in/around Ruby is defined in Ruby box and line breaking [[!CSS3RUBY]].
975-
</ul>
976-
977977
<h3 id="line-break-property">
978978
Breaking Rules for Punctuation: the 'line-break' property</h3>
979979

css-text/Overview.html

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
175175
<li><a href=#tab-size-property><span class=secno>4.2</span> Tab Character Size: the <span class=property data-link-type=propdesc title=tab-size>tab-size</span> property</a></ul>
176176
<li><a href=#line-breaking><span class=secno>5</span> Line Breaking and Word Boundaries</a>
177177
<ul class=toc>
178-
<li><a href=#word-break-property><span class=secno>5.1</span> Breaking Rules for Letters: the <span class=property data-link-type=propdesc title=word-break>word-break</span> property</a>
179-
<li><a href=#line-break-details><span class=secno>5.2</span> Line Breaking Details</a>
178+
<li><a href=#line-break-details><span class=secno>5.1</span> Line Breaking Details</a>
179+
<li><a href=#word-break-property><span class=secno>5.2</span> Breaking Rules for Letters: the <span class=property data-link-type=propdesc title=word-break>word-break</span> property</a>
180180
<li><a href=#line-break-property><span class=secno>5.3</span> Breaking Rules for Punctuation: the <span class=property data-link-type=propdesc title=line-break>line-break</span> property</a></ul>
181181
<li><a href=#hyphenation><span class=secno>6</span>Breaking Within Words</a>
182182
<ul class=toc>
@@ -976,7 +976,48 @@ <h2 class="heading settled heading" data-level=5 id=line-breaking><span class=se
976976
much appreciated.
977977
</div>
978978

979-
<h3 class="heading settled heading" data-level=5.1 id=word-break-property><span class=secno>5.1 </span><span class=content>
979+
<h3 class="heading settled heading" data-level=5.1 id=line-break-details><span class=secno>5.1 </span><span class=content>
980+
Line Breaking Details</span><a class=self-link href=#line-break-details></a></h3>
981+
982+
<p>When determining <a data-link-type=dfn href=#line-break title="line breaks">line breaks</a>:
983+
<ul>
984+
<li>Regardless of the <a class=property data-link-type=propdesc href=#propdef-white-space title=white-space>white-space</a> value,
985+
lines always break at each <a data-link-type=dfn href=#preserved title=preserved>preserved</a> forced break character:
986+
for all values, line-breaking behavior defined for
987+
the BK, CR, LF, CM, NL, and SG line breaking classes in <a data-biblio-type=normative data-link-type=biblio href=#biblio-uax14 title=biblio-uax14>[UAX14]</a>
988+
must be honored.
989+
<li>When <a class=property data-link-type=propdesc href=#propdef-white-space title=white-space>white-space</a> allows wrapping,
990+
line breaking behavior defined for the WJ, ZW, and GL line-breaking classes in <a data-biblio-type=normative data-link-type=biblio href=#biblio-uax14 title=biblio-uax14>[UAX14]</a>
991+
must be honored.
992+
<li>UAs that allow wrapping at punctuation other than spaces should prioritize breakpoints.
993+
For example, if breaks after slashes are given a lower priority than spaces,
994+
the sequence "check /etc" will never break between the "/" and the "e".
995+
As long as care is taken to avoid such awkward breaks, allowing breaks at
996+
appropriate punctuation other than spaces is recommended, as it results
997+
in more even-looking margins, particularly in narrow measures.
998+
The UA may use the width of the containing block, the text’s language,
999+
and other factors in assigning priorities.
1000+
<li>Out-of-flow elements do not introduce a <a data-link-type=dfn href=#forced-line-break title="forced line break">forced line break</a>
1001+
or <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunity">soft wrap opportunity</a> in the flow.
1002+
<li>The line breaking behavior of a replaced element or other atomic inline
1003+
is equivalent to that of the Object Replacement Character (U+FFFC)
1004+
and introduces a <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunity">soft wrap opportunity</a> both before and after itself.
1005+
For Web-compatibility, this rule take precedence over <code>WJ</code> and <code>GL</code> handling;
1006+
in terms of <a data-biblio-type=normative data-link-type=biblio href=#biblio-uax14 title=biblio-uax14>[UAX14]</a>,
1007+
this shifts the <code>CB</code> rule (<a href=http://www.unicode.org/reports/tr14/#LB20><code>LB20</code></a>)
1008+
immediately above the <code>WJ</code> and <code>GL</code> rules (<a href=http://www.unicode.org/reports/tr14/#LB11><code>LB11</code></a>/<a href=http://www.unicode.org/reports/tr14/#LB12><code>LB12</code></a>).
1009+
<li>For <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">soft wrap opportunities</a> created by characters that disappear at the line break (e.g. U+0020 SPACE),
1010+
properties on the element containing that character control the line breaking at that opportunity.
1011+
For <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">soft wrap opportunities</a> defined by the boundary between two characters,
1012+
the properties on the element containing the boundary control breaking.
1013+
1014+
<li>For <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">soft wrap opportunities</a> before the first or after the last character of a box,
1015+
the break occurs immediately before/after the box (at its margin edge)
1016+
rather than breaking the box between its content edge and the content.
1017+
<li>Line breaking in/around Ruby is defined in Ruby box and line breaking <a data-biblio-type=normative data-link-type=biblio href=#biblio-css3ruby title=biblio-css3ruby>[CSS3RUBY]</a>.
1018+
</ul>
1019+
1020+
<h3 class="heading settled heading" data-level=5.2 id=word-break-property><span class=secno>5.2 </span><span class=content>
9801021
Breaking Rules for Letters: the <a class=property data-link-type=propdesc href=#propdef-word-break title=word-break>word-break</a> property</span><a class=self-link href=#word-break-property></a></h3>
9811022

9821023
<table class=propdef>
@@ -1096,47 +1137,6 @@ <h3 class="heading settled heading" data-level=5.1 id=word-break-property><span
10961137
due to <a class=css data-link-type=maybe href=#valuedef-break-all title=break-all>break-all</a>, the characters must still be shaped as if the
10971138
word were not broken.</p>
10981139

1099-
<h3 class="heading settled heading" data-level=5.2 id=line-break-details><span class=secno>5.2 </span><span class=content>
1100-
Line Breaking Details</span><a class=self-link href=#line-break-details></a></h3>
1101-
1102-
<p>When determining <a data-link-type=dfn href=#line-break title="line breaks">line breaks</a>:
1103-
<ul>
1104-
<li>Regardless of the <a class=property data-link-type=propdesc href=#propdef-white-space title=white-space>white-space</a> value,
1105-
lines always break at each <a data-link-type=dfn href=#preserved title=preserved>preserved</a> forced break character:
1106-
for all values, line-breaking behavior defined for
1107-
the BK, CR, LF, CM, NL, and SG line breaking classes in <a data-biblio-type=normative data-link-type=biblio href=#biblio-uax14 title=biblio-uax14>[UAX14]</a>
1108-
must be honored.
1109-
<li>When <a class=property data-link-type=propdesc href=#propdef-white-space title=white-space>white-space</a> allows wrapping,
1110-
line breaking behavior defined for the WJ, ZW, and GL line-breaking classes in <a data-biblio-type=normative data-link-type=biblio href=#biblio-uax14 title=biblio-uax14>[UAX14]</a>
1111-
must be honored.
1112-
<li>UAs that allow wrapping at punctuation other than spaces should prioritize breakpoints.
1113-
For example, if breaks after slashes are given a lower priority than spaces,
1114-
the sequence "check /etc" will never break between the "/" and the "e".
1115-
As long as care is taken to avoid such awkward breaks, allowing breaks at
1116-
appropriate punctuation other than spaces is recommended, as it results
1117-
in more even-looking margins, particularly in narrow measures.
1118-
The UA may use the width of the containing block, the text’s language,
1119-
and other factors in assigning priorities.
1120-
<li>Out-of-flow elements do not introduce a <a data-link-type=dfn href=#forced-line-break title="forced line break">forced line break</a>
1121-
or <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunity">soft wrap opportunity</a> in the flow.
1122-
<li>The line breaking behavior of a replaced element or other atomic inline
1123-
is equivalent to that of the Object Replacement Character (U+FFFC)
1124-
and introduces a <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunity">soft wrap opportunity</a> both before and after itself.
1125-
For Web-compatibility, this rule take precedence over <code>WJ</code> and <code>GL</code> handling;
1126-
in terms of <a data-biblio-type=normative data-link-type=biblio href=#biblio-uax14 title=biblio-uax14>[UAX14]</a>,
1127-
this shifts the <code>CB</code> rule (<a href=http://www.unicode.org/reports/tr14/#LB20><code>LB20</code></a>)
1128-
immediately above the <code>WJ</code> and <code>GL</code> rules (<a href=http://www.unicode.org/reports/tr14/#LB11><code>LB11</code></a>/<a href=http://www.unicode.org/reports/tr14/#LB12><code>LB12</code></a>).
1129-
<li>For <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">soft wrap opportunities</a> created by characters that disappear at the line break (e.g. U+0020 SPACE),
1130-
properties on the element containing that character control the line breaking at that opportunity.
1131-
For <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">soft wrap opportunities</a> defined by the boundary between two characters,
1132-
the properties on the element containing the boundary control breaking.
1133-
1134-
<li>For <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">soft wrap opportunities</a> before the first or after the last character of a box,
1135-
the break occurs immediately before/after the box (at its margin edge)
1136-
rather than breaking the box between its content edge and the content.
1137-
<li>Line breaking in/around Ruby is defined in Ruby box and line breaking <a data-biblio-type=normative data-link-type=biblio href=#biblio-css3ruby title=biblio-css3ruby>[CSS3RUBY]</a>.
1138-
</ul>
1139-
11401140
<h3 class="heading settled heading" data-level=5.3 id=line-break-property><span class=secno>5.3 </span><span class=content>
11411141
Breaking Rules for Punctuation: the <a class=property data-link-type=propdesc href=#propdef-line-break title=line-break>line-break</a> property</span><a class=self-link href=#line-break-property></a></h3>
11421142

@@ -2920,7 +2920,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
29202920
<li>value for hyphens, <a href=#valuedef-auto1 title="section 6.1">6.1</a>
29212921
<li>value for text-align-last, <a href=#valuedef-auto2 title="section 7.3">7.3</a>
29222922
<li>value for text-justify, <a href=#valuedef-auto title="section 7.4">7.4</a>
2923-
</ul><li>break-all, <a href=#valuedef-break-all title="section 5.1">5.1</a>
2923+
</ul><li>break-all, <a href=#valuedef-break-all title="section 5.2">5.2</a>
29242924
<li>break-word, <a href=#valuedef-break-word title="section 6.2">6.2</a>
29252925
<li>capitalize, <a href=#valuedef-capitalize title="section 2.1">2.1</a>
29262926
<li>center, <a href=#valuedef-center title="section 7.1">7.1</a>
@@ -2947,7 +2947,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
29472947
<li>justification opportunity, <a href=#justification-opportunity title="section 7.4.1">7.4.1</a>
29482948
<li>justify, <a href=#valuedef-justify title="section 7.1">7.1</a>
29492949
<li>justify-all, <a href=#valuedef-justify-all title="section 7.1">7.1</a>
2950-
<li>keep-all, <a href=#valuedef-keep-all title="section 5.1">5.1</a>
2950+
<li>keep-all, <a href=#valuedef-keep-all title="section 5.2">5.2</a>
29512951
<li>last, <a href=#valuedef-last title="section 9.2">9.2</a>
29522952
<li>left, <a href=#valuedef-left title="section 7.1">7.1</a>
29532953
<li>&lt;length&gt;<ul><li>value for word-spacing, <a href=#valuedef-length0 title="section 8.1">8.1</a>
@@ -2967,7 +2967,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
29672967
<li>value for text-justify, <a href=#valuedef-none2 title="section 7.4">7.4</a>
29682968
<li>value for hanging-punctuation, <a href=#valuedef-none title="section 9.2">9.2</a>
29692969
</ul><li>normal<ul><li>value for white-space, <a href=#valuedef-normal0 title="section 3">3</a>
2970-
<li>value for word-break, <a href=#valuedef-normal1 title="section 5.1">5.1</a>
2970+
<li>value for word-break, <a href=#valuedef-normal1 title="section 5.2">5.2</a>
29712971
<li>value for line-break, <a href=#valuedef-normal2 title="section 5.3">5.3</a>
29722972
<li>value for overflow-wrap, <a href=#valuedef-normal3 title="section 6.2">6.2</a>
29732973
<li>value for word-spacing, <a href=#valuedef-normal4 title="section 8.1">8.1</a>
@@ -3004,7 +3004,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
30043004
<li>visually-perceived character, <a href=#visually-perceived-character title="section 1.3.1">1.3.1</a>
30053005
<li>visually-perceived letter, <a href=#visually-perceived-letter title="section 1.3.1">1.3.1</a>
30063006
<li>white-space, <a href=#propdef-white-space title="section 3">3</a>
3007-
<li>word-break, <a href=#propdef-word-break title="section 5.1">5.1</a>
3007+
<li>word-break, <a href=#propdef-word-break title="section 5.2">5.2</a>
30083008
<li>word separator, <a href=#word-separator title="section 8.1">8.1</a>
30093009
<li>word-separator character, <a href=#word-separator title="section 8.1">8.1</a>
30103010
<li>word-spacing, <a href=#propdef-word-spacing title="section 8.1">8.1</a>

0 commit comments

Comments
 (0)