hyphens-manual-inline-012.html (1983B)
1 <!DOCTYPE html> 2 3 <meta charset="UTF-8"> 4 5 <title>CSS Text: 'hyphens: manual' with 4 explicit hyphenation opportunities (inline)</title> 6 7 <link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> 8 <link rel="help" href="https://www.w3.org/TR/css-text-3/#hyphenation"> 9 <link rel="match" href="reference/hyphens-manual-inline-012M-ref.html"> 10 <link rel="match" href="reference/hyphens-manual-inline-012H-ref.html"> 11 12 <!-- 13 User agents may use U+2010 HYPHEN <https://codepoints.net/U+2010> 14 when the font has the glyph, or 15 may use U+002D HYPHEN-MINUS <https://codepoints.net/U+002d> 16 otherwise. Some fonts will display slightly different glyphs for 17 these code points. Therefore these 2 reference files. 18 The M-ref.html reference file means the hyphen-Minus character U+002D. 19 The H-ref.html reference file means the Hyphen character U+2010. 20 --> 21 22 <meta content="When 'hyphens' is set to 'manual' and applied to an inline element, then words can be hyphenated only if characters inside the words explicitly define hyphenation opportunities. In this test, the characters inside the word 'Deoxyribonucleic' explicitly define 4 hyphenation opportunities. Since 'Deoxy' has 5 characters and 'Deoxyribo' has 9 characters and since the content width of the block box can take 8 characters, then a soft hyphen will occur after 'Deoxy'. Since 'ribonu' has 6 characters and 'ribonucleic' has 11 characters and since the content width of the block box can take 8 characters, then a soft hyphen will occur after 'ribonu'." name="assert"> 23 24 <style> 25 div 26 { 27 border: black solid 2px; 28 font-family: monospace; 29 font-size: 32px; 30 width: 8ch; 31 } 32 33 span 34 { 35 hyphens: manual; 36 } 37 </style> 38 39 <div>DNA <span>means Deo­xy­ribo­nu­cleic acid</span>.</div> 40 41 <!-- 42 Expected result: 43 DNA 44 means 45 Deoxy- 46 ribonu- 47 cleic 48 acid. 49 -->