word-break-normal-ko-000

word-break: normal, korean

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
word-break: normal means words break according to their customary rules. Korean, which commonly exhibits two different behaviors, allows breaks between any two consecutive Hangul/Hanja.

Source

 1 <!DOCTYPE html>
 2 <html lang="en"><head>
 3 <meta charset="utf-8">
 4 <title>word-break: normal, korean</title>
 5 <meta content="word-break: normal means words break according to their customary rules. Korean, which commonly exhibits two different behaviors, allows breaks between any two consecutive Hangul/Hanja." name="assert">
 6 <link href="https://drafts.csswg.org/css-text-3/#word-break-property" rel="help">
 7 <link href="reference/word-break-normal-ko-ref-000.htm" rel="match">
 8 <link href="mailto:ishida@w3.org" rel="author" title="Richard Ishida">
 9 <style type="text/css">
10 .test { word-break: normal; }
11 /* the CSS below is not part of the test */
12 .test, .ref { border: 1px solid orange;  margin: 20px;  padding: 10px; width: 390px; font: 36px/1 sans-serif; }
13 </style>
14 </head>
15 <body>
16 <div id="instructions">Test passes if the two orange boxes are the same.</div>
17 <div lang="ko" class="test"><div id="testdiv"><span id="testspan">한글이 한글이 한글이</span></div></div>
18 <div lang="ko" class="ref"><span>한글이 한글이 한글<br></span></div>
19 <script>
20 var sentenceWidth = document.getElementById('testspan').offsetWidth
21 document.getElementById('testdiv').style.width = String(sentenceWidth - 5)+'px'
22 </script>
23 <!--
24 Notes:
25 It is possible to break Korean at character or word boundaries, depending on author preference. Breaking at character boundaries tends to be more common in modern Korean text, so that has been chosen as the reference here.  If the word breaks at word boundaries, that is not necessarily an error, but it is not what the spec describes for word-break: normal.
26 -->
27 
28 </body></html>