mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 21:58:41 +02:00
Automatic update from web-platform-tests [css-text] Implement the 'overflow-wrap: anywhere' feature This feature will be implemented as an alias of word-break: break-word, which the CSS Text 3 declared as deprecated in future levels of the spec. There has been a long standing interoperability issues with the 'word-break: break-word' feature, implemented in Blink and WebKit but not in Firefox, since it was declared as deprecated. This feature can't be removed to avoid compatibility issues, but also because it provide a behavior that web authors really need, which is that breaking opportunities are considered in th min-content size of the box. The CSS WG resolved [1] that the best approach is to add a new value to the overflow-wrap CSS property, that provides basically the same behavior than 'overflow-wrap: break-word' but allowing the breaking opportunities to be part of the min-content size computation. This CL will enable the feature by default in next release, since the intent-to-implement-and-ship request [2] has been already approved. [1] https://github.com/w3c/csswg-drafts/issues/2682 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/CeGWh7l1Jq4/NeQXxZ4UCAAJ Bug: 905315 Change-Id: I89bbc78f68f425dbad714c8546bc72c530887eb3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838194 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#712867} -- Fix Ahem -- wpt-commits: fd6d0cf9a5695ab232b125089ffc6bf42756d053, ad37572b36809af1f914f1b90cb15ae258ce9581 wpt-pr: 19570
37 lines
1.5 KiB
HTML
37 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Text Test: word-break:break-word + white-space:break-spaces</title>
|
|
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
|
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://www.w3.org/TR/css-text-3/#white-space-property">
|
|
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
|
|
<link rel="help" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property">
|
|
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-anywhere">
|
|
<meta name="flags" content="ahem">
|
|
<link rel="match" href="reference/white-space-break-spaces-005-ref.html">
|
|
<meta name="assert" content="anywhere + break-spaces do allow a break
|
|
between the last character of a word and the first space of a sequence of preserved spaces
|
|
if there are no other wrapping opportunities earlier in the line">
|
|
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
|
<style>
|
|
div {
|
|
font: 25px/1 Ahem;
|
|
}
|
|
.expected {
|
|
position: absolute;
|
|
color: green;
|
|
width: 100px;
|
|
height: 100px;
|
|
white-space: pre;
|
|
}
|
|
.test {
|
|
background: green;
|
|
color: red;
|
|
width: 4ch;
|
|
|
|
white-space: break-spaces;
|
|
overflow-wrap: anywhere;
|
|
</style>
|
|
|
|
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
|
<div class="expected">XXXX<br> <br>XXXX<br></div>
|
|
<div class="test">XXXX XXXX </div>
|