white-space-vs-joiners-001.html (1158B)
1 <!DOCTYPE html> 2 <meta charset=utf-8> 3 4 <title>CSS Text Test: join controls do not disrupt white-space processing</title> 5 <link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com"> 6 <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-rules"> 7 <!-- NB: The spec doesn't explicitly discuss join controls in this context, 8 but it is self-evident that they should not have any effect on the white-space processing. 9 Their only effect should be on the shaping (if any) of the adjacent characters. --> 10 <link rel="match" href="reference/white-space-vs-joiners-001-ref.html"> 11 <meta name="assert" content="The presence of join controls (ZWJ/ZWNJ) at word edges should not affect white-space processing"> 12 13 <style> 14 p { 15 width: fit-content; 16 border: 2px solid green; 17 font: 24px monospace; 18 } 19 </style> 20 21 <body> 22 </body> 23 24 <script> 25 for (i = 0x200b; i <= 0x200f; ++i) { 26 txt = " " 27 + String.fromCharCode(i) 28 + "This should have no leading or trailing [" 29 + i.toString(16) 30 + "]" 31 + String.fromCharCode(i) 32 + " "; 33 p = document.createElement("p"); 34 p.textContent = txt; 35 document.body.appendChild(p); 36 } 37 </script>