hyphens-auto-control.html (1461B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Text 6.1. Hyphenation Control: the hyphens property</title> 6 <link rel="author" title="Chun-Min (Jeremy) Chen" href="mailto:jeremychen@mozilla.com"> 7 <link rel="author" title="Mozilla" href="https://www.mozilla.org"> 8 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-hyphens-auto"> 9 <link rel="match" href="hyphens-auto-control-ref.html"> 10 <meta name="assert" content="Test checks that automatic hyphenation opportunities within a word 11 must be ignored if the word contains a conditional hyphen (­ or U+00AD), in favor of the 12 conditional hyphen(s)."> 13 <style> 14 code { 15 display: block; 16 hyphens: auto; 17 border: 1px solid black; 18 /* Prefer Courier New if available, as otherwise Menlo may be used, 19 and its HYPHEN and HYPHEN-MINUS glyphs don't match. */ 20 font-family: Courier New, Courier, monospace; 21 } 22 </style> 23 </head> 24 <body lang="en-us"> 25 <!-- 26 Hyphenation opportunities of the texts in this test are as follows, 27 28 frag[A]ilis[A]tic[C]ex[A]pi[A]ali 29 30 where [A] is an automatic hyphen, and [C] is a conditional hyphen. 31 32 In this test, we set width to somewhere after the conditional hyphen, 33 then we see if automatic hyphen breaks are ignored correctly. 34 --> 35 <code style="width:12ch;"> 36 fragilistic­expiali 37 </code> 38 <br /> 39 <code style="width:14ch;"> 40 fragilistic­expiali 41 </code> 42 <br /> 43 <code style="width:16ch;"> 44 fragilistic­expiali 45 </code> 46 </body> 47 </html>