1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
5 <title>letter-spacing.html
</title>
6 <style type=
"text/css">
7 body
{ overflow: hidden
; }
10 background-color: #eee;
14 background-color: white
;
18 background-color: #ccf;
25 letter-spacing: 0.5em;
28 letter-spacing: 200em;
31 letter-spacing: 100000em;
35 letter-spacing: -0.5em;
38 letter-spacing: -200em;
41 letter-spacing: -10000em;
46 unicode-bidi: bidi-override
;
52 <!-- these should render fine (tests regular, partially opaque text) -->
53 <p class=
"desc">The following lines test various combinations of
54 letter-spacing (especially negative values) and opacity. All of the lines
55 should say
"Hello, world" but the spacing and background shading will vary
56 from test to test. The W3C specs are fairly silent on how user agents
57 should handle unusual values of letter-spacing, especially negative ones,
58 which are explicitly implementation-dependent. Different browsers will
59 render these differently, but hopefully the WebKit ports will be consistent,
62 <p class=
"desc">The first line should be normally spaced.
</p>
63 <p><span class=
"ls0">Hello, world
</span></p>
65 <p class=
"desc">The next line tests a slight positive letter spacing, and
66 should be slightly spaced out (wider than normal).
</p>
67 <p><span class=
"ls05">Hello, world
</span></p>
69 <p class=
"desc">The next line tests a large positive letter spacing, and
70 should be *very* spaced out. You may only see an 'H' and a 'w', perhaps
71 on two different lines, unless you scroll way to the right.
</p>
72 <p><span class=
"ls200">Hello, world
</span></p>
74 <p class=
"desc">The next line tests a very large positive letter spacing,
75 and should also be *very* spaced out. You may only see an 'H' and a 'w',
76 perhaps on two different lines, unless you scroll way to the right.
</p>
77 <p><span class=
"ls10000">Hello, world
</span></p>
79 <p class=
"desc">The next line tests a small negative line spacing, and
80 should be crammed backwards
</p>
81 <p><span class=
"ls-05">Hello, world
</span></p>
83 <p class=
"desc">The next line tests a large negative line spacing, and
84 should be just display an 'H'
</p>
85 <p><span class=
"ls-200">Hello, world
</span></p>
87 <p class=
"desc">The next line tests a very large negative line spacing,
88 and should just have an 'H'.
</p>
89 <p><span class=
"ls-10000">Hello, world
</span></p>
91 <p class=
"desc">The next few lines test the interaction with opacity.
92 The first line should be normally spaced out, slightly opaque,
93 and on a differently-colored background
</p>
94 <p><span class=
"ls0 opaque">Hello, world
</span></p>
96 <p class=
"desc">The next line tests a small positive line spacing, and
97 should be slightly spaced out, opaque, and on a background.
</p>
98 <p><span class=
"ls05 opaque">Hello, world
</span></p>
100 <p class=
"desc">The next line tests a large positive line spacing, and
101 should be very widely spaced, on a background.
</p>
102 <p><span class=
"ls200 opaque">Hello, world
</span></p>
104 <p class=
"desc">The next line tests a very large positive line spacing,
105 and should be very widely spaced but blank, and on a background.
</p>
106 <p><span class=
"ls10000 opaque">Hello, world
</span></p>
108 <p class=
"desc">The next line tests a small negative line spacing, and should
110 <p><span class=
"ls-05 opaque">Hello, world
</span></p>
112 <p class=
"desc">The next line tests a large negative line spacing, and
114 <p><span class=
"ls-200 opaque">Hello, world
</span></p>
116 <p class=
"desc">The next line tests a very large negative line spacing,
117 and should be blank.
</p>
118 <p><span class=
"ls-10000 opaque">Hello, world
</span></p>
120 <p class=
"desc">Now we do a few basic right-to-left tests:
</p>
122 <p class=
"desc">The first line should be normally spaced.
</p>
123 <p><span class=
"ls0 rtl">Hello, world
</span></p>
125 <p class=
"desc">The next line should be slightly spaced out (wider than
127 <p><span class=
"ls05 rtl">Hello, world
</span></p>
128 <p class=
"desc">The next line should be crammed backwards, just as if
129 it wasn't right-to-left
</p>
130 <p><span class=
"ls-05 rtl">Hello, world
</span></p>
132 <p class=
"desc">The next line tests a large negative line spacing, and
133 should just print a 'd'
</p>
134 <p><span class=
"ls-200 rtl">Hello, world
</span></p>
136 <p class=
"desc">Now, opacity as well -
137 The next line should be printed right to left, slightly spaced out
138 (wider than normal), and on a background.
</p>
139 <p><span class=
"ls05 rtl opaque">Hello, world
</span></p>
141 <p class=
"desc">The next line tests a small negative line spacing, and
143 <p><span class=
"ls-05 rtl opaque">Hello, world
</span></p>
145 <p class=
"desc">The next line tests a large negative line spacing, and
146 it should be blank.
</p>
147 <p><span class=
"ls-200 rtl opaque">Hello, world
</span></p>