Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (33 sloc) 1.54 KB
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: white-space - break-spaces</title>
<link rel="author" title="Javier Fernandez" href="" />
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="">
<link rel="help" title="5.2. Breaking Rules for Letters: the word-break property" href="">
<link rel="help" href="">
<link rel="help" href="">
<link rel="match" href="reference/white-space-break-spaces-005-ref.html">
<meta name="flags" content="ahem">
<meta name="assert" content="A single leading white-space should be used, honoring white-space: break-spaces, to avoid overflow; however, a single preserved white-space at the end of the line cannot be wrapped, hence it overflows when breaking after it to move the rest of the text to the next line.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
div {
font: 25px/1 Ahem;
.fail {
position: absolute;
color: red;
z-index: -1;
span { color: green; }
.test {
color: green;
width: 4ch;
white-space: break-spaces;
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="fail"><span>XXXX</span><br>XXXX<br>XXX<span>X</span><br><span>XXXX</span></div>
<div class="test"> XXXX XXX</div>
You can’t perform that action at this time.