line-break-anywhere-014.html (1142B)
1 <!DOCTYPE html> 2 <html lang=en> 3 <meta charset="utf-8"> 4 <title>CSS Text Test: line-break: anywhere</title> 5 <link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com"> 6 <link rel="help" title="5.3. Line Breaking Strictness: the line-break property" href="https://www.w3.org/TR/css-text-3/#propdef-line-break"> 7 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-line-break-anywhere"> 8 <link rel="match" href="reference/line-break-anywhere-004-ref.html"> 9 <meta name="assert" content="line-break:anywhere allows breaking opportunities before backslash characters."> 10 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 11 <style> 12 div { 13 position: relative; 14 font-size: 20px; 15 font-family: Ahem; 16 line-height: 1em; 17 } 18 .red { 19 position: absolute; 20 width: 100px; 21 height: 100px; 22 background: green; 23 color: red; 24 z-index: -1; 25 } 26 .test { 27 color: green; 28 width: 3ch; 29 line-break: anywhere; 30 } 31 </style> 32 <body> 33 <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> 34 <div class="red">XXX<br>XX</div> 35 <div class="test">XXX\X</div> 36 </body>