word-break-break-all-007.html (1439B)
1 <!DOCTYPE html> 2 <html lang="en" > 3 <head> 4 <meta charset="utf-8"> 5 <title>word-break: break-all, combining diacritic</title> 6 <meta name="assert" content="word-break: break-all means lines may break between any two typographic letter units. An combining diacritic plus base character should be wrapped as a unit to the next line."> 7 <link rel='help' href='https://drafts.csswg.org/css-text-3/#word-break-property'> 8 <link rel='match' href='reference/word-break-break-all-ref-007.html'> 9 <link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> 10 <style type='text/css'> 11 .test { word-break: break-all; } 12 /* the CSS below is not part of the test */ 13 .test, .ref { border: 1px solid orange; margin: 20px; padding: 10px; width: 390px; font: 36px/1.5 sans-serif; } 14 </style> 15 </head> 16 <body> 17 <div id='instructions'>Test passes if the two orange boxes are the same.</div> 18 <div class="test" lang="my"><div id="testdiv"><span id="testspan">မြန်မာစာမြန်မာစာမြန်</span></div></div> 19 <div class="ref" lang="my"><span>မြန်မာစာမြန်မာစာမြ<br/>န်</span></div> 20 <script> 21 var sentenceWidth = document.getElementById('testspan').offsetWidth 22 document.getElementById('testdiv').style.width = String(sentenceWidth - 5)+'px' 23 </script> 24 <!-- 25 Notes: 26 A typographic unit based on extended grapheme clusters groups base characters and combining characters together. 27 --> 28 </body> 29 </html>