summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/text/word-spacing-characters-002.xht
blob: 1f2578c29ba72322583d1fa0668a84366b4f7b0b (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
                      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>CSS Test: word-spacing on Fixed-Width Space Characters</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"/>
  <link rel="help" href="https://drafts.csswg.org/css-text-3/#word-spacing-property"/>
  <link rel="match" href="word-spacing-characters-002-ref.xht"/>
  <meta name="assert" content="Word-spacing does not affect fixed-width spaces."/>
  <style type="text/css">
    div {
      margin: 1em;
      font-family: monospace;
      page-break-inside: avoid;
    }
    div p {
      margin: 0;
    }

    .control span {
      background: blue;
      color: blue;
    }
    .test span {
      word-spacing: 4em;
      background: orange;
      color: orange;
    }
    .ws-pre p {
      white-space: pre;
    }
    body > div { display: inline-block; } /* to avoid overflowing the screen. Non essential to the test. */
  </style>
 </head>
 <body>
   <p>In each of the following pairs, the blue and orange bars must have equal lengths.</p>

   <!-- IDEOGRAPHIC SPACE -->
   <div class="ws-normal">
     <p class="control"><span>A&#x3000;&#x3000;&#x3000;&#x3000;B</span></p>
     <p class="test"><span>A&#x3000;&#x3000;&#x3000;&#x3000;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x3000;&#x3000;&#x3000;&#x3000;B</span></p>
     <p class="test"><span>A&#x3000;&#x3000;&#x3000;&#x3000;B</span></p>
   </div>

   <!-- EN QUAD -->
   <div class="ws-normal">
     <p class="control"><span>A&#x2000;&#x2000;&#x2000;&#x2000;B</span></p>
     <p class="test"><span>A&#x2000;&#x2000;&#x2000;&#x2000;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x2000;&#x2000;&#x2000;&#x2000;B</span></p>
     <p class="test"><span>A&#x2000;&#x2000;&#x2000;&#x2000;B</span></p>
   </div>

   <!-- EM QUAD -->
   <div class="ws-normal">
     <p class="control"><span>A&#x2001;&#x2001;&#x2001;&#x2001;B</span></p>
     <p class="test"><span>A&#x2001;&#x2001;&#x2001;&#x2001;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x2001;&#x2001;&#x2001;&#x2001;B</span></p>
     <p class="test"><span>A&#x2001;&#x2001;&#x2001;&#x2001;B</span></p>
   </div>

   <!-- EN SPACE -->
   <div class="ws-normal">
     <p class="control"><span>A&#x2002;&#x2002;&#x2002;&#x2002;B</span></p>
     <p class="test"><span>A&#x2002;&#x2002;&#x2002;&#x2002;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x2002;&#x2002;&#x2002;&#x2002;B</span></p>
     <p class="test"><span>A&#x2002;&#x2002;&#x2002;&#x2002;B</span></p>
   </div>

   <!-- EM SPACE -->
   <div class="ws-normal">
     <p class="control"><span>A&#x2003;&#x2003;&#x2003;&#x2003;B</span></p>
     <p class="test"><span>A&#x2003;&#x2003;&#x2003;&#x2003;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x2003;&#x2003;&#x2003;&#x2003;B</span></p>
     <p class="test"><span>A&#x2003;&#x2003;&#x2003;&#x2003;B</span></p>
   </div>

   <!-- THREE-PER-EM SPACE -->
   <div class="ws-normal">
     <p class="control"><span>A&#x2004;&#x2004;&#x2004;&#x2004;B</span></p>
     <p class="test"><span>A&#x2004;&#x2004;&#x2004;&#x2004;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x2004;&#x2004;&#x2004;&#x2004;B</span></p>
     <p class="test"><span>A&#x2004;&#x2004;&#x2004;&#x2004;B</span></p>
   </div>

   <!-- FOUR-PER-EM SPACE -->
   <div class="ws-normal">
     <p class="control"><span>A&#x2005;&#x2005;&#x2005;&#x2005;B</span></p>
     <p class="test"><span>A&#x2005;&#x2005;&#x2005;&#x2005;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x2005;&#x2005;&#x2005;&#x2005;B</span></p>
     <p class="test"><span>A&#x2005;&#x2005;&#x2005;&#x2005;B</span></p>
   </div>

   <!-- SIX-PER-EM SPACE -->
   <div class="ws-normal">
     <p class="control"><span>A&#x2006;&#x2006;&#x2006;&#x2006;B</span></p>
     <p class="test"><span>A&#x2006;&#x2006;&#x2006;&#x2006;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x2006;&#x2006;&#x2006;&#x2006;B</span></p>
     <p class="test"><span>A&#x2006;&#x2006;&#x2006;&#x2006;B</span></p>
   </div>

   <!-- FIGURE SPACE -->
   <div class="ws-normal">
     <p class="control"><span>A&#x2007;&#x2007;&#x2007;&#x2007;B</span></p>
     <p class="test"><span>A&#x2007;&#x2007;&#x2007;&#x2007;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x2007;&#x2007;&#x2007;&#x2007;B</span></p>
     <p class="test"><span>A&#x2007;&#x2007;&#x2007;&#x2007;B</span></p>
   </div>

   <!-- PUNCTUATION SPACE -->
   <div class="ws-normal">
     <p class="control"><span>A&#x2008;&#x2008;&#x2008;&#x2008;B</span></p>
     <p class="test"><span>A&#x2008;&#x2008;&#x2008;&#x2008;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x2008;&#x2008;&#x2008;&#x2008;B</span></p>
     <p class="test"><span>A&#x2008;&#x2008;&#x2008;&#x2008;B</span></p>
   </div>

   <!--THIN SPACE  -->
   <div class="ws-normal">
     <p class="control"><span>A&#x2009;&#x2009;&#x2009;&#x2009;B</span></p>
     <p class="test"><span>A&#x2009;&#x2009;&#x2009;&#x2009;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x2009;&#x2009;&#x2009;&#x2009;B</span></p>
     <p class="test"><span>A&#x2009;&#x2009;&#x2009;&#x2009;B</span></p>
   </div>

   <!-- HAIR SPACE -->
   <div class="ws-normal">
     <p class="control"><span>A&#x200A;&#x200A;&#x200A;&#x200A;B</span></p>
     <p class="test"><span>A&#x200A;&#x200A;&#x200A;&#x200A;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x200A;&#x200A;&#x200A;&#x200A;B</span></p>
     <p class="test"><span>A&#x200A;&#x200A;&#x200A;&#x200A;B</span></p>
   </div>

   <!-- NARROW NO-BREAK SPACE -->
   <div class="ws-normal">
     <p class="control"><span>A&#x202F;&#x202F;&#x202F;&#x202F;B</span></p>
     <p class="test"><span>A&#x202F;&#x202F;&#x202F;&#x202F;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x202F;&#x202F;&#x202F;&#x202F;B</span></p>
     <p class="test"><span>A&#x202F;&#x202F;&#x202F;&#x202F;B</span></p>
   </div>

   <!-- MEDIUM MATHEMATICAL SPACE -->
   <div class="ws-normal">
     <p class="control"><span>A&#x205F;&#x205F;&#x205F;&#x205F;B</span></p>
     <p class="test"><span>A&#x205F;&#x205F;&#x205F;&#x205F;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x205F;&#x205F;&#x205F;&#x205F;B</span></p>
     <p class="test"><span>A&#x205F;&#x205F;&#x205F;&#x205F;B</span></p>
   </div>


 </body>
</html>