176259b72ed7e5807b318d848ce1d2b7c9657873
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / css / css-text / white-space / pre-wrap-015.html
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <title>CSS Text Test: white-space: pre-wrap</title>
4 <link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
5 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">
6 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all">
7 <meta name="flags" content="ahem">
8 <link rel="match" href="reference/pre-wrap-001-ref.html">
9 <meta name="assert" content="The text is broken at the end of the space between the two words, never before, so it hangs and cause an overflow">
10 <style>
11 div {
12   position: relative;
13   font: 20px/1 Ahem;
14 }
15 .ref {
16   position: absolute;
17   color: red;
18   z-index: -1;
19 }
20 .test {
21   color: green;
22   width: 20px;
23
24   white-space: pre-wrap;
25   word-break: break-all;
26 }
27 </style>
28 <body>
29   <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
30   <div class="ref">X<span style="color: green">X</span><br>X<span style="color: green">X</span></div>
31   <div class="test">X X</div>
32 </body>