Skip to content

Commit e9bbca8

Browse files
committed
[css-text] Further clarifications to word-break.
--HG-- extra : rebase_source : 58321531e02f174f365a12e025bc865040494426
1 parent 9e909db commit e9bbca8

2 files changed

Lines changed: 24 additions & 8 deletions

File tree

css-text/Overview.bs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,9 @@ Line Breaking Details</h3>
894894

895895
<p>This property specifies <i>soft wrap opportunities</i> between letters,
896896
i.e. where it is “normal” and permissible to break lines of text.
897+
It does not affect rules governing the <i>soft wrap opportunities</i>
898+
created by spaces and punctuation.
899+
(See 'line-break' for controls affecting punctuation.)
897900

898901
<div class="example">
899902
<p>For example, in some styles of CJK typesetting, English words are allowed
@@ -923,23 +926,28 @@ Line Breaking Details</h3>
923926

924927
<dl dfn-for=word-break dfn-type=value>
925928
<dt><dfn>normal</dfn></dt>
926-
<dd><i>Soft wrap opportunities</i> are as defined <a href="#line-breaking">above</a>.</dd>
929+
<dd>Words break according to their customary rules,
930+
as described <a href="#line-breaking">above</a>.
931+
Korean, which commonly exhibits two different behaviors,
932+
allows breaks between any two consecutive Hangul/Hanja.
933+
927934
<dt><dfn>break-all</dfn></dt>
928-
<dd>In addition to ''word-break:normal'' <i>soft wrap opportunities</i>,
935+
<dd>In addition to ''word-break/normal'' <i>soft wrap opportunities</i>,
929936
lines may break between any two <i>semantically-perceived letters</i>
930937
(except where forbidden by the 'line-break' property).
931938
Hyphenation is not applied. This option is used mostly in a context where
932939
the text is predominantly using CJK characters with few non-CJK excerpts
933940
and it is desired that the text be better distributed on each line.</dd>
941+
934942
<dt><dfn>keep-all</dfn></dt>
935943
<dd>
936944
Implicit <i>soft wrap opportunities</i> between <i>semantically-perceived letters</i> are suppressed,
937945
i.e. breaks are prohibited between pairs of letters
938946
(including those explicitly allowed by 'line-break')
939947
except where opportunities exist due to dictionary-based breaking.
940-
Otherwise this option is equivalent to ''word-break:normal''.
948+
Otherwise this option is equivalent to ''word-break/normal''.
941949
In this style, sequences of CJK characters do not break.
942-
<p class=note>This is sometimes seen in Korean (which uses spaces between words),
950+
<p class=note>This is the other common behavior for Korean (which uses spaces between words),
943951
and is also useful for mixed-script text where CJK snippets are mixed
944952
into another language that uses spaces for separation.</dd>
945953
</dl>

css-text/Overview.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,9 @@ <h3 class="heading settled heading" data-level=5.2 id=word-break-property><span
10651065

10661066
<p>This property specifies <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">soft wrap opportunities</a> between letters,
10671067
i.e. where it is “normal” and permissible to break lines of text.
1068+
It does not affect rules governing the <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">soft wrap opportunities</a>
1069+
created by spaces and punctuation.
1070+
(See <a class=property data-link-type=propdesc href=#propdef-line-break title=line-break>line-break</a> for controls affecting punctuation.)
10681071

10691072
<div class=example>
10701073
<p>For example, in some styles of CJK typesetting, English words are allowed
@@ -1094,23 +1097,28 @@ <h3 class="heading settled heading" data-level=5.2 id=word-break-property><span
10941097

10951098
<dl data-dfn-for=word-break data-dfn-type=value>
10961099
<dt><dfn class=css-code data-dfn-for=word-break data-dfn-type=value data-export="" id=valuedef-normal1>normal<a class=self-link href=#valuedef-normal1></a></dfn></dt>
1097-
<dd><a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">Soft wrap opportunities</a> are as defined <a href=#line-breaking>above</a>.</dd>
1100+
<dd>Words break according to their customary rules,
1101+
as described <a href=#line-breaking>above</a>.
1102+
Korean, which commonly exhibits two different behaviors,
1103+
allows breaks between any two consecutive Hangul/Hanja.
1104+
10981105
<dt><dfn class=css-code data-dfn-for=word-break data-dfn-type=value data-export="" id=valuedef-break-all>break-all<a class=self-link href=#valuedef-break-all></a></dfn></dt>
1099-
<dd>In addition to <span class=css data-link-type=maybe title=word-break:normal>word-break:normal</span> <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">soft wrap opportunities</a>,
1106+
<dd>In addition to <a class=css data-link-for=word-break data-link-type=maybe href=#valuedef-normal1 title=normal>normal</a> <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">soft wrap opportunities</a>,
11001107
lines may break between any two <a data-link-type=dfn href=#semantically-perceived-letter title="semantically-perceived letters">semantically-perceived letters</a>
11011108
(except where forbidden by the <a class=property data-link-type=propdesc href=#propdef-line-break title=line-break>line-break</a> property).
11021109
Hyphenation is not applied. This option is used mostly in a context where
11031110
the text is predominantly using CJK characters with few non-CJK excerpts
11041111
and it is desired that the text be better distributed on each line.</dd>
1112+
11051113
<dt><dfn class=css-code data-dfn-for=word-break data-dfn-type=value data-export="" id=valuedef-keep-all>keep-all<a class=self-link href=#valuedef-keep-all></a></dfn></dt>
11061114
<dd>
11071115
Implicit <a data-link-type=dfn href=#soft-wrap-opportunity title="soft wrap opportunities">soft wrap opportunities</a> between <a data-link-type=dfn href=#semantically-perceived-letter title="semantically-perceived letters">semantically-perceived letters</a> are suppressed,
11081116
i.e. breaks are prohibited between pairs of letters
11091117
(including those explicitly allowed by <a class=property data-link-type=propdesc href=#propdef-line-break title=line-break>line-break</a>)
11101118
except where opportunities exist due to dictionary-based breaking.
1111-
Otherwise this option is equivalent to <span class=css data-link-type=maybe title=word-break:normal>word-break:normal</span>.
1119+
Otherwise this option is equivalent to <a class=css data-link-for=word-break data-link-type=maybe href=#valuedef-normal1 title=normal>normal</a>.
11121120
In this style, sequences of CJK characters do not break.
1113-
<p class=note>This is sometimes seen in Korean (which uses spaces between words),
1121+
<p class=note>This is the other common behavior for Korean (which uses spaces between words),
11141122
and is also useful for mixed-script text where CJK snippets are mixed
11151123
into another language that uses spaces for separation.</dd>
11161124
</dl>

0 commit comments

Comments
 (0)