hyphens-auto-003.html (1333B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Text: 'hyphens: auto' with a valid 'lang' attribute specification</title> 4 <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> 5 <link rel="help" title="5.4. Hyphenation: the hyphens property" href="https://drafts.csswg.org/css-text-3/#hyphenation"> 6 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-hyphens-auto"> 7 <link rel="match" href="reference/hyphens-auto-002-ref.html"> 8 <meta name="flags" content="ahem"> 9 <meta name="assert" content="Although hyphenation is enabled, honoring 'auto' value for the 'hyphens' CSS property and a valid 'lang' attribute, the words fit. However, we should break after the preserved combination of white+ideographic space sequence, honoring 'white-space: normal' to prevent overflow."> 10 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 11 <style> 12 .fail { 13 position: absolute; 14 background: red; 15 width: 100px; 16 height: 100px; 17 z-index: -1; 18 } 19 .test { 20 font: 50px/1 Ahem; 21 width: 4ch; 22 color: green; 23 24 hyphens: auto; 25 } 26 </style> 27 <body lang="en"> 28 <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> 29 <div class="fail"></div> 30 <div class="test">XX        XX</div> 31 </body>