9ecaa919ddfd42c920523e123afbeec232bdc920
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / css / css-text / white-space / break-spaces-009.html
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <title>CSS Text Test: word-break:break-word + 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://drafts.csswg.org/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-word">
9 <meta name="flags" content="ahem">
10 <link rel="match" href="reference/white-space-break-spaces-005-ref.html">
11 <meta name="assert" content="break-word + break-spaces do allow a break
12 between the last character of a word and the first space of a sequence of preserved spaces
13 if there are no other wrapping opportunities earlier in the line">
14 <style>
15 div {
16   position: relative;
17   font: 25px/1 Ahem;
18 }
19 .red {
20   position: absolute;
21   color: green;
22   width: 100px;
23   height: 100px;
24   white-space: pre;
25 }
26 .test {
27   background: green;
28   color: red;
29   width: 4ch;
30   z-index: -1;
31
32   white-space: break-spaces;
33   word-break: break-word;
34 </style>
35
36 <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
37 <div class="red">XXXX<br> <br>XXXX<br></div>
38 <div class="test">XXXX XXXX </div>