Skip to content

Commit 38d6bee

Browse files
committed
[css-text] Add examples and explanatory text for word-break to make it less confusing.
1 parent fa83c35 commit 38d6bee

File tree

2 files changed

+51
-6
lines changed

2 files changed

+51
-6
lines changed

css-text/Overview.html

+28-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
rel=dcterms.rights>
1111
<meta content="CSS Text Module Level 3 (CSS3 Text)" name=dcterms.title>
1212
<meta content=text name=dcterms.type>
13-
<meta content=2013-05-11 name=dcterms.date>
13+
<meta content=2013-05-13 name=dcterms.date>
1414
<meta content="Elika J. Etemad" name=dcterms.creator>
1515
<meta content="Koji Ishii" name=dcterms.creator>
1616
<meta content=W3C name=dcterms.publisher>
@@ -43,12 +43,12 @@
4343

4444
<h1>CSS Text Module Level 3</h1>
4545

46-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 11 May 2013</h2>
46+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 13 May 2013</h2>
4747

4848
<dl>
4949
<dt>This version:</dt>
5050
<!--
51-
<dd><a href="http://www.w3.org/TR/2013/WD-css3-text-20130511/">http://www.w3.org/TR/2013/WD-css3-text-20130511/</a></dd>
51+
<dd><a href="http://www.w3.org/TR/2013/WD-css3-text-20130513/">http://www.w3.org/TR/2013/WD-css3-text-20130513/</a></dd>
5252
-->
5353

5454
<dd><a
@@ -1380,7 +1380,31 @@ <h3 id=word-break><span class=secno>5.3. </span> Breaking Rules for
13801380
</table>
13811381

13821382
<p>This property specifies <a href="#soft-wrap-opportunity"><i>soft wrap
1383-
opportunities</i></a> between letters. Values have the following meanings:
1383+
opportunities</i></a> between letters, i.e. where it is “normal” and
1384+
permissible to break lines of text.
1385+
1386+
<div class=example>
1387+
<p>For example, in some styles of CJK typesetting, English words are
1388+
allowed to break between any two letters, rather than only at spaces or
1389+
hyphenation points; this can be enabled with ‘<a
1390+
href="#break-all"><code class=css>word-break:break-all</code></a>’.
1391+
<figure> <img
1392+
alt="A snippet of Japanese text with English in it. The word 'caption' is broken into 'capt' and 'ion' across two lines."
1393+
src=break-all.png> <figcaption>An example of English text embedded in
1394+
Japanese being broken at an arbitrary point in the word.</figcaption>
1395+
</figure>
1396+
1397+
<p>As another example, Korean has two styles of line-breaking: between any
1398+
two Korean syllables (‘<code class=css>word-break: normal</code>’)
1399+
or, like English, mainly at spaces (‘<code class=css>word-break:
1400+
keep-all</code>’).
1401+
</div>
1402+
1403+
<p class=note> To enable additional break opportunities only in the case of
1404+
overflow, see ‘<a href="#overflow-wrap0"><code
1405+
class=property>overflow-wrap</code></a>’.
1406+
1407+
<p>Values have the following meanings:
13841408

13851409
<dl>
13861410
<dt><dfn id=normal1 title="word-break:normal"><code

css-text/Overview.src.html

+23-2
Original file line numberDiff line numberDiff line change
@@ -990,8 +990,29 @@ <h3 id="word-break">
990990
</tr>
991991
</table>
992992

993-
<p>This property specifies <i>soft wrap opportunities</i> between letters.
994-
Values have the following meanings:</p>
993+
<p>This property specifies <i>soft wrap opportunities</i> between letters,
994+
i.e. where it is “normal” and permissible to break lines of text.
995+
996+
<div class="example">
997+
<p>For example, in some styles of CJK typesetting, English words are allowed
998+
to break between any two letters, rather than only at spaces or hyphenation points;
999+
this can be enabled with ''word-break:break-all''.
1000+
1001+
<figure>
1002+
<img src="break-all.png" alt="A snippet of Japanese text with English in it. The word 'caption' is broken into 'capt' and 'ion' across two lines.">
1003+
<figcaption>An example of English text embedded in Japanese being broken at an arbitrary point in the word.</figcaption>
1004+
</figure>
1005+
1006+
<p>As another example, Korean has two styles of line-breaking:
1007+
between any two Korean syllables (''word-break: normal'')
1008+
or, like English, mainly at spaces (''word-break: keep-all'').
1009+
</div>
1010+
1011+
<p class="note">
1012+
To enable additional break opportunities only in the case of overflow,
1013+
see 'overflow-wrap'.
1014+
1015+
<p>Values have the following meanings:</p>
9951016

9961017
<dl>
9971018
<dt><dfn title="word-break:normal">''normal''</dfn></dt>

0 commit comments

Comments
 (0)