13770b7b8d189a404d44e73dfe19eba1c0e48b58
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / css / css-text / white-space / break-spaces-004.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 Garcia-Boente" 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/pre-wrap-001-ref.html">
11 <meta name="assert" content="The word is not broken if there are previous breaking opportunities, honoring the 'white-space: break-spaces' value.">
12 <style>
13 div {
14   position: relative;
15   font: 20px/1 Ahem;
16 }
17 .fail {
18   position: absolute;
19   color: red;
20   z-index: -1;
21 }
22 span { color: green; }
23 .test {
24   color: green;
25   width: 2ch;
26
27   white-space: break-spaces;
28   word-break: break-word;
29 }
30 </style>
31 <body>
32   <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
33   <div class="fail"><span>XX</span><br>XX</div>
34   <div class="test"> XX</div>
35 </body>