break-spaces-before-first-ideographic-char-002.html (1588B)
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.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-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-overflow-wrap-break-word"> 9 <link rel="match" href="reference/white-space-break-spaces-005-ref.html"> 10 <meta name="flags" content="ahem"> 11 <meta name="assert" content="A breaking opportunity exists before the first character of a sequence of ideographic spaces to avoid the line overflow, honoring the overflow-wrap property, except when there are previous breaking opportunities."> 12 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 13 <style> 14 div { 15 font: 25px/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: 4ch; 26 27 white-space: break-spaces; 28 overflow-wrap: break-word; 29 } 30 31 </style> 32 <body> 33 <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> 34 <div class="fail">X<span>XXX<br></span>XX<span>X</span>X<br><span>XXXX<br></span><span>XXXX<br></span></div> 35 <div class="test">X XX X</div> 36 </body>