Skip to content

Commit

Permalink
[css-text] Allow flexibility where spec is undefined
Browse files Browse the repository at this point in the history
Closes #19903
  • Loading branch information
frivoal committed Dec 3, 2019
1 parent ab7d907 commit fabb1c9
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>word-break: break-all on inline element</title>
<link rel='author' title='Jonathan Kew' href='mailto:[email protected]'>
<style>
div {
border: solid 5px;
margin: 5px;
font-family: monospace;
width: 6.1ch;
padding: 1px;
}
.test { word-break: break-all; }
.blue { border-color: blue; }
.orange { border-color: orange; }
</style>
<p>Test passes if the black box is identical to either the blue or the orange one.
<div class="blue">aaaabb<br>bbbbbb<br>bbb<br>ccccc</div>
<div>aaaabb<br>bbbbbb<br>bbb<br>ccccc</div>
<div class="orange">aaaabb<br>bbbbbb<br>bb<br>bccccc</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>word-break: break-all on inline element</title>
<link rel='author' title='Jonathan Kew' href='mailto:[email protected]'>
<style>
div {
border: solid 5px;
margin: 5px;
font-family: monospace;
width: 6.1ch;
padding: 1px;
}
.test { word-break: break-all; }
.blue { border-color: blue; }
.orange { border-color: orange; }
</style>
<p>Test passes if the black box is identical to either the blue or the orange one.
<div class="blue">aaaabb<br>bbbbbb<br>bbb<br>ccccc</div>
<div>aaaabb<br>bbbbbb<br>bb<br>bccccc</div>
<div class="orange">aaaabb<br>bbbbbb<br>bb<br>bccccc</div>

This file was deleted.

26 changes: 15 additions & 11 deletions css/css-text/word-break/word-break-break-all-inline-006.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@
<title>word-break: break-all on inline element</title>
<meta name="assert" content="word-break: break-all works when specified on inline element">
<link rel='help' href='https://drafts.csswg.org/css-text-3/#word-break-property'>
<link rel='match' href='reference/word-break-break-all-inline-006-ref.html'>
<link rel='match' href='reference/word-break-break-all-inline-006-a-ref.html'>
<link rel='match' href='reference/word-break-break-all-inline-006-b-ref.html'>
<link rel='author' title='Jonathan Kew' href='mailto:[email protected]'>
<style>
.testdiv { font-family: monospace; width: 6.1ch; padding: 1px; margin: 10px; border: 1px solid silver; }
div {
border: solid 5px;
margin: 5px;
font-family: monospace;
width: 6.1ch;
padding: 1px;
}
.test { word-break: break-all; }
.blue { border-color: blue; }
.orange { border-color: orange; }
</style>
<div>Test passes if the two boxes are the same.</div>
<div class="testdiv">aaaa<span class="test">bbbbbbbbbbb</span>ccccc</div>
<!--
Some browsers may decide to break before the last 'b', which is still conformant from the spec
perspective. However, this test would fail in that case. Current spec states that behavior is
undefined in the boundaries of the inline-box. See https://github.com/web-platform-tests/wpt/issues/19903
and https://github.com/w3c/csswg-drafts/issues/3897 for details.
-->
<div class="testdiv">aaaabb<br>bbbbbb<br>bbb<br>ccccc</div>
<p>Test passes if the black box is identical to either the blue or the orange one.
<div class="blue">aaaabb<br>bbbbbb<br>bbb<br>ccccc</div>
<div>aaaa<span class="test">bbbbbbbbbbb</span>ccccc</div>
<div class="orange">aaaabb<br>bbbbbb<br>bb<br>bccccc</div>

0 comments on commit fabb1c9

Please sign in to comment.