line-break-loose-012.xht (2599B)
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <title>CSS Text Test: line-break - loose and Katakana-Hiragana prolonged sound marks</title> 6 <!-- Katakana-Hiragana prolonged sound marks --> 7 <link rel="author" title="Taka Oshiyama" href="mailto:takaoshiyama@gmail.com" /> 8 <link rel="author" title="Shinyu Murakami" href="mailto:murakami@vivliostyle.org" /> 9 <link rel="help" title="5.3. Line Breaking Rules: the 'line-break' property" href="https://drafts.csswg.org/css-text-3/#line-break-property" /> 10 <link rel="match" href="reference/line-break-loose-012-ref.xht" /> 11 <meta http-equiv="content-language" content="en, ja" /> 12 <meta name="assert" content="This test verifies that 'line-break: loose' allows line breaking before Katakana-Hiragana prolonged sound marks such as (U+30FC) and (U+FF70)." /> 13 <style type="text/css"> 14 @font-face 15 { 16 font-family: "mplus-1p-regular"; 17 src: url("/fonts/mplus-1p-regular.woff") format("woff"); 18 /* filesize: 803300 bytes (784.5 KBytes) */ 19 /* 20 mplus-1p-regular.ttf can be downloaded at/from [TBD later] 21 */ 22 } 23 .test span { 24 line-break: loose; /* The property to be tested */ 25 } 26 p.test, p.control { 27 border: 1px solid gray; 28 color: blue; 29 font-family: "mplus-1p-regular"; 30 width: 10.2em; /* added extra .2em for some symbols wider than 1em */ 31 } 32 span.target { 33 background-color: aqua; 34 } 35 div.wrapper { 36 display: inline-block; 37 border: 1px solid; 38 margin: 10px; 39 padding: 10px; 40 } 41 </style> 42 </head> 43 <body lang="en"> 44 <p> 45 Test passes if the highlighted characters in each pair of rectangles are at the exact same horizontal position. 46 </p> 47 <div class="wrapper"> 48 <!-- Katakana-Hiragana prolonged sound mark - fullwidth --> 49 <p class="test" lang="ja"> 50 <span>サンプル文サンプル文<span class="target">ー</span>サンプル文</span> 51 </p> 52 <p class="control" lang="ja"> 53 <span>サンプル文サンプル文<br /><span class="target">ー</span>サンプル文</span> 54 </p> 55 </div> 56 <div class="wrapper"> 57 <!-- Katakana-Hiragana prolonged sound mark - halfwidth --> 58 <p class="test" lang="ja"> 59 <span>サンプル文サンプル文<span class="target">ー</span>サンプル文</span> 60 </p> 61 <p class="control" lang="ja"> 62 <span>サンプル文サンプル文<br /><span class="target">ー</span>サンプル文</span> 63 </p> 64 </div> 65 </body> 66 </html>