Status: PASS | Duration: 17ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-text/white-space/break-spaces-011.html
<!DOCTYPE html> <meta charset="utf-8"> <title>CSS Text Test: line breaking with white-space: break-spaces and element boundaries</title> <link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com" /> <link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> <link rel="help" title="5.1. Line Breaking Details" href="https://drafts.csswg.org/css-text-3/#line-break-details"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> <meta name="flags" content="ahem"> <link rel="match" href="reference/white-space-break-spaces-005-ref.html"> <meta name="assert" content="An element boundary doesn't allow breaking if white-space is set to break-spaces at both sides of the boundary"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <style> div { font: 25px/1 Ahem; } .fail { position: absolute; color: red; z-index: -1; } .fail span { color: green; } .test { color: green; width: 4.1ch; /* ".1" to cover floating point errors. */ white-space: break-spaces; } </style> <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> <div class="fail">XXXX<br>X<span>X</span>X<span>X</span><br>XX<span>XX</span><br>X<span>X</span>X<span>X</span></div> <div class="test"><span>XXXX</span> X X XX<span> </span><span> </span>X X</div>
/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html
<!DOCTYPE html> <meta charset="utf-8"> <title>CSS Text Reference File</title> <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> <style> div { width: 100px; height: 100px; background: green; } </style> <body> <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> <div></div> </body>