-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
Copy pathbreak-spaces-011.html
31 lines (30 loc) · 1.4 KB
/
break-spaces-011.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!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>