Update the CSS Text WPT test suite
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / css / css-text / white-space / break-spaces-006.html
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <title>CSS Text Test: white-space - break-spaces</title>
4 <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
5 <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">
6 <link rel="help" title="5.2. Breaking Rules for Letters: the word-break property" href="https://drafts.csswg.org/css-text-3/#word-break-property">
7 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
8 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all">
9 <link rel="match" href="reference/white-space-break-spaces-005-ref.html">
10 <meta name="flags" content="ahem">
11 <meta name="assert" content="White spaces are preserved, honoring the 'white-space: break-spaces', but the words are broken, honring the 'word-beak: break-all' even though there are previous breaking opportunities in the white-spaces.">
12 <style>
13 div {
14   font: 25px/1 Ahem;
15 }
16 .fail {
17   position: absolute;
18   color: red;
19   z-index: -1;
20 }
21 span { color: green; }
22 .test {
23   color: green;
24   width: 4ch;
25
26   white-space: break-spaces;
27   word-break: break-all;
28 }
29 </style>
30 <body>
31   <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
32   <div class="fail"><span>X</span>XXX<br>X<span>X</span>XX<br>X<span>XXX</span><br><span>XXXX</span></div>
33   <div class="test"> XXXX XXX</div>
34 </body>