blob: 0b7c401a8b3187bdf10f8f37b21fb0b107a093c4 (
plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>CSS Test: word-spacing on Flexible Space Characters (adapted from word-spacing-characters-001.htm)</title>
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
<link rel="help" href="http://www.w3.org/TR/CSS21/text.html#spacing-props">
<meta name="flags" content="">
<meta name="assert" content="Word-spacing affects each space (U+0020) and non-breaking space (U+00A0).">
<style type="text/css">
div {
margin: 1em;
font-family: monospace;
page-break-inside: avoid;
}
div p {
margin: 0;
}
.controlcontrol {
background: orange;
width: 4em;
}
.control span {
background: blue;
color: blue;
}
.spacer {
padding-left: 4em;
}
.test span {
word-spacing: 4em;
background: orange;
color: orange;
}
.ws-pre p {
white-space: pre;
}
</style>
</head>
<body>
<p>In each of the following pairs, the blue and orange bars must have equal lengths.</p>
<div>
<p class="control"><span class="spacer"></span> </p>
<p class="controlcontrol"> </p>
</div>
<div class="ws-normal">
<p class="control"><span>A <span class="spacer"></span>B</span></p>
<p class="test"><span>A B</span></p>
</div>
<div class="ws-normal">
<p class="control"><span>A <span class="spacer"></span>B</span></p>
<p class="test"><span>A B</span></p>
</div>
<div class="ws-pre">
<p class="control"><span>A <span class="spacer"></span> <span class="spacer"></span>B</span></p>
<p class="test"><span>A B</span></p>
</div>
<div class="ws-normal">
<p class="control"><span>A <span class="spacer"></span>B</span></p>
<p class="test"><span>A B</span></p>
</div>
<div class="ws-normal">
<p class="control"><span>A <span class="spacer"></span><span class="spacer"></span>B</span></p>
<p class="test"><span>A B</span></p>
</div>
<div class="ws-pre">
<p class="control"><span>A <span class="spacer"></span><span class="spacer"></span>B</span></p>
<p class="test"><span>A B</span></p>
</div>
<div class="ws-normal">
<p class="control"><span>A <span class="spacer"></span><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span>B</span></p>
<!-- The original test has two spaces between the non-breaking spaces below. This causes WebKit to split the text into two-runs and drop the second of the two spaces.
This entire test can be replaced with word-spacing-characters-001.htm from the css test suite when https://bugs.webkit.org/show_bug.cgi?id=89827 is fixed.-->
<p class="test"><span>A
B</span></p>
</div>
<div class="ws-pre">
<p class="control"><span>A <span class="spacer"></span><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> B</span></p>
<p class="test"><span>A B</span></p>
</div>
</div>
</body>
</html>
|