word-break-keep-all-063.html (1730B)
1 <!DOCTYPE html> 2 3 <html lang="en"> 4 5 <meta charset="UTF-8"> 6 7 <title>CSS Text: 'word-break: keep-all' applied to an inline in latin</title> 8 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> 10 <link rel="help" href="https://www.w3.org/TR/css-text-3/#word-break-property"> 11 <link rel="match" href="reference/word-break-keep-all-063-ref.html"> 12 13 <style> 14 div 15 { 16 border: orange solid; 17 font: 24px monospace; 18 margin-bottom: 4px; 19 width: 15ch; 20 /* 21 15 in 15ch is an entirely arbitrary number. 22 */ 23 word-break: break-all; 24 /* 25 'word-break: break-all' applied on the 26 wrapping block is necessary to verify 27 that 'word-break: keep-all' is 28 implemented 29 */ 30 } 31 32 div#ws-normal 33 { 34 white-space: normal; 35 } 36 37 div#ws-prewrap 38 { 39 white-space: pre-wrap; 40 } 41 42 div#ws-breakspaces 43 { 44 white-space: break-spaces; 45 } 46 47 div#ws-preline 48 { 49 white-space: pre-line; 50 } 51 52 span.test 53 { 54 word-break: keep-all; 55 } 56 57 div#reference 58 { 59 word-break: normal; 60 } 61 </style> 62 63 <p>Test passes if the glyphs in the 5 orange rectangles are laid out <strong>identically</strong>. 64 65 <div id="ws-normal">A simple <span class="test">sentence</span> in english.</div> 66 67 <div id="ws-prewrap">A simple <span class="test">sentence</span> in english.</div> 68 69 <div id="ws-breakspaces">A simple <span class="test">sentence</span> in english.</div> 70 71 <div id="ws-preline">A simple <span class="test">sentence</span> in english.</div> 72 73 <div id="reference">A simple<br>sentence in eng<br>lish.</div> 74 <!-- 123456789012345 -->