line-break-loose-013.xht (2375B)
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 hyphens</title> 6 <!-- hyphens --> 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-013-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 U+301C and U+30A0." /> 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 <!-- hyphens --> 48 <div class="wrapper"> 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 <p class="test" lang="ja"> 58 <span>サンプル文サンプル文<span class="target">゠</span>サンプル文</span> 59 </p> 60 <p class="control" lang="ja"> 61 <span>サンプル文サンプル文<br /><span class="target">゠</span>サンプル文</span> 62 </p> 63 </div> 64 </body> 65 </html>