Skip to content

Commit

Permalink
[css-text-3] Add 'overflow-wrap: anywhere' with 'break-word' semantic…
Browse files Browse the repository at this point in the history
…s except that the break opportunities *are* considered when calculating min-content. #2682 (comment)
  • Loading branch information
fantasai committed Oct 23, 2018
1 parent 36df68c commit 6100c15
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions css-text-3/Overview.bs
Expand Up @@ -1352,7 +1352,7 @@ Line Breaking Details</h3>

<pre class="propdef">
Name: overflow-wrap, word-wrap
Value: normal | break-word
Value: normal | break-word | anywhere
Initial: normal
Applies to: <a>inline boxes</a>
Inherited: yes
Expand All @@ -1379,19 +1379,24 @@ Line Breaking Details</h3>
<dd>Lines may break only at allowed break points. However, the restrictions
introduced by ''word-break: keep-all'' may be relaxed to match ''word-break: normal''
if there are no otherwise-acceptable break points in the line.</dd>
<dt><dfn>break-word</dfn></dt>

<dt><dfn>anywhere</dfn>
<dd>An otherwise unbreakable sequence of <a>characters</a>
may be broken at an arbitrary point if
there are no otherwise-acceptable break points in the line.
Shaping characters are still shaped as if the word were not
broken, and grapheme clusters must stay together as one unit.
No hyphenation character is inserted at the break point.
<a>Soft wrap opportunities</a> introduced by ''overflow-wrap/anywhere''
<em>are considered</em>
when calculating <a lt="min-content size">min-content intrinsic sizes</a>.

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

<p><a>Soft wrap opportunities</a> introduced by ''overflow-wrap: break-word''
are not considered when calculating <a lt="min-content size">min-content intrinsic sizes</a>.

<p>For legacy reasons, UAs must treat 'word-wrap' as an [=legacy name alias=]
of the 'overflow-wrap' property.

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

Expand Down

0 comments on commit 6100c15

Please sign in to comment.