word-break-break-all-004.html (1354B)
1 <!DOCTYPE html> 2 <html lang="en" > 3 <head> 4 <meta charset="utf-8"> 5 <title>word-break: break-all, arabic</title> 6 <meta name="assert" content="word-break: break-all means lines may break between any two typographic letter units. When shaping scripts such as Arabic are allowed to break within words due to break-all, the characters must still be shaped as if the word were not broken."> 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-004.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 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" dir="rtl" lang="ar"><div id="testdiv"><span id="testspan">التدويل نشاط التدويل</span></div></div> 19 <div class="ref" dir="rtl" lang="ar"><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 </body> 25 </html>