Skip to content

Commit 6100c15

Browse files
committed
[css-text-3] Add 'overflow-wrap: anywhere' with 'break-word' semantics except that the break opportunities *are* considered when calculating min-content. #2682 (comment)
1 parent 36df68c commit 6100c15

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

css-text-3/Overview.bs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,7 @@ Line Breaking Details</h3>
13521352

13531353
<pre class="propdef">
13541354
Name: overflow-wrap, word-wrap
1355-
Value: normal | break-word
1355+
Value: normal | break-word | anywhere
13561356
Initial: normal
13571357
Applies to: <a>inline boxes</a>
13581358
Inherited: yes
@@ -1379,19 +1379,24 @@ Line Breaking Details</h3>
13791379
<dd>Lines may break only at allowed break points. However, the restrictions
13801380
introduced by ''word-break: keep-all'' may be relaxed to match ''word-break: normal''
13811381
if there are no otherwise-acceptable break points in the line.</dd>
1382-
<dt><dfn>break-word</dfn></dt>
1382+
1383+
<dt><dfn>anywhere</dfn>
13831384
<dd>An otherwise unbreakable sequence of <a>characters</a>
13841385
may be broken at an arbitrary point if
13851386
there are no otherwise-acceptable break points in the line.
13861387
Shaping characters are still shaped as if the word were not
13871388
broken, and grapheme clusters must stay together as one unit.
13881389
No hyphenation character is inserted at the break point.
1390+
<a>Soft wrap opportunities</a> introduced by ''overflow-wrap/anywhere''
1391+
<em>are considered</em>
1392+
when calculating <a lt="min-content size">min-content intrinsic sizes</a>.
13891393

1394+
<dt><dfn>break-word</dfn></dt>
1395+
<dd>As for ''overflow-wrap/anywhere'' except that <a>soft wrap opportunities</a>
1396+
are <em>not</em> considered
1397+
when calculating <a lt="min-content size">min-content intrinsic sizes</a>.
13901398
</dl>
13911399

1392-
<p><a>Soft wrap opportunities</a> introduced by ''overflow-wrap: break-word''
1393-
are not considered when calculating <a lt="min-content size">min-content intrinsic sizes</a>.
1394-
13951400
<p>For legacy reasons, UAs must treat 'word-wrap' as an [=legacy name alias=]
13961401
of the 'overflow-wrap' property.
13971402

@@ -3105,7 +3110,7 @@ Changes</h2>
31053110
<li>Qualified that only lowercase letters are titlecased for ''text-transform: capitalize''; uppercase letters remain unaffected.
31063111
<li>For ''word-break: break-all'', switched to UAX14 notion of “letters”,
31073112
since that handles symbols better.
3108-
<li>Added ''line-break: anywhere''.
3113+
<li>Added ''line-break: anywhere'' and ''overflow-wrap: anywhere''.
31093114
<li>Tweaked handling of Ambiguous characters during <a href="#line-break-transform">segment break transformation</a> to respond to language context.
31103115
</ul>
31113116

0 commit comments

Comments
 (0)