line-breaking-028.html (1525B)
1 <!doctype html> 2 <html> 3 <meta charset="utf-8"> 4 <title>CSS Text — line breaking around Break After and Exclamation</title> 5 <meta name=assert content="When ‘white-space’ allows wrapping, line breaking behavior defined for BA and EX line-breaking classes in [UAX14] must be honored."> 6 <link rel=help href="https://www.w3.org/TR/css-text-3/#line-breaking"> 7 <link rel=help href="https://bugzilla.mozilla.org/show_bug.cgi?id=628825"> 8 <link rel=author title="Makoto Kato" href="mailto:m_kato@ga2.so-net.ne.jp"> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 <style> 12 .test > div { 13 font-family: monospace; 14 font-size: 25px; 15 width: 1ch; 16 line-height: 30px; 17 } 18 </style> 19 <body> 20 21 <div class="test"> 22 <div id="nonbreakable1">X፡!</div> 23 <div id="nonbreakable2">X !</div> 24 <div id="nonbreakable3">X !</div> 25 <div id="nonbreakable4">X !</div> 26 </div> 27 28 <script> 29 test(function() { 30 assert_true(document.getElementById('nonbreakable1').offsetHeight <= 35); 31 }, "U+0x1361 (BA) and U+0x0021 (EX)"); 32 test(function() { 33 assert_true(document.getElementById('nonbreakable2').offsetHeight <= 35); 34 }, "U+0x1680 (BA) and U+0x0021 (EX)"); 35 test(function() { 36 assert_true(document.getElementById('nonbreakable3').offsetHeight <= 35); 37 }, "U+0x2009 (BA) and U+0x0021 (EX)"); 38 test(function() { 39 assert_true(document.getElementById('nonbreakable4').offsetHeight <= 35); 40 }, "U+0x205F (BA) and U+0x0021 (EX)"); 41 </script> 42 43 <div id='log'></div> 44 45 </body> 46 </html>