break-spaces-before-first-ideographic-char-005.html (1861B)
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://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" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> 8 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> 9 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all"> 10 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-word"> 11 <link rel="match" href="reference/white-space-break-spaces-005-ref.html"> 12 <meta name="flags" content="ahem"> 13 <meta name="assert" content="A breaking opportunity exists only after a ideographic space character, but it's possible to avoid the overflow honoring the 'word-break' property, hence the overflow-wrap property is not applied."> 14 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 15 <style> 16 div { 17 font: 25px/1 Ahem; 18 } 19 .fail { 20 position: absolute; 21 color: red; 22 z-index: -1; 23 } 24 span { color: green; } 25 .test { 26 color: green; 27 width: 4ch; 28 29 white-space: break-spaces; 30 overflow-wrap: break-word; 31 word-break: break-all; 32 } 33 34 </style> 35 <body> 36 <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> 37 <div class="fail">X<span>X</span>X<span>X<br></span>X<span>X</span>X<span>X<br></span><span>XXXX<br></span><span>XXXX<br></span></div> 38 <div class="test">X XX X</div> 39 </body>