Skip to content

Commit 2c13101

Browse files
committed
[css-text-3] Tweak example: markup, wording, source formatting
1 parent 8511b2b commit 2c13101

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

css-text-3/Overview.bs

+14-7
Original file line numberDiff line numberDiff line change
@@ -1046,11 +1046,14 @@ Line Breaking Details</h3>
10461046
background: white;
10471047
}
10481048
</style>
1049-
<p>Japanese is usually laid out to allow line breaks within words.
1050-
However, it is sometimes preferred to suppress these wrapping opportunities and to only allow wrapping at the end of certain sentence fragments.
1051-
This is most commonly done in very short pieces of text, such as headings, table or figure captions.
1052-
1053-
This can be achieved by marking the allowed wrapping points with <{wbr}> or U+200B ZERO WIDTH SPACE,
1049+
<p>Japanese is usually typeset allowing line breaks within words.
1050+
However, it is sometimes preferred to suppress these wrapping opportunities
1051+
and to only allow wrapping at the end of certain sentence fragments.
1052+
This is most commonly done in very short pieces of text,
1053+
such as headings and table or figure captions.
1054+
1055+
This can be achieved by marking the allowed wrapping points
1056+
with <{wbr}> or U+200B ZERO WIDTH SPACE,
10541057
and suppressing the other ones using ''word-break: keep-all''.
10551058

10561059
For instance, the following markup can produce either of the renderings below,
@@ -1060,12 +1063,16 @@ Line Breaking Details</h3>
10601063
</code></pre>
10611064

10621065
<table class=data>
1066+
<colgroup span=1></colgroup>
1067+
<colgroup span=2></colgroup>
1068+
<thead>
10631069
<tr>
10641070
<td>
10651071
<th><code highlight=css>h1 { word-break: normal }</code>
10661072
<th><code highlight=css>h1 { word-break: keep-all }</code>
1073+
<tbody>
10671074
<tr>
1068-
<th>Expected rendering
1075+
<th scope=row>Expected rendering
10691076
<td>
10701077
<pre lang=ja>
10711078
窓ぎわのトットちゃ
@@ -1075,7 +1082,7 @@ Line Breaking Details</h3>
10751082
窓ぎわの
10761083
トットちゃん</pre>
10771084
<tr>
1078-
<th>Result in your browser
1085+
<th scope=row>Result in your browser
10791086
<td>
10801087
<samp lang=ja>
10811088
窓ぎわの<wbr>トットちゃん

0 commit comments

Comments
 (0)