summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/text/word-spacing-characters-003.xht
blob: a5119af6cabf613e38dcf5508393f4add6cef939 (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
<!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 Zero-Width 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-003-ref.xht"/>
  <meta name="assert" content="Word-spacing does not affect zero-width characters."/>
  <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;
    }
  </style>
 </head>
 <body>
   <p>In each of the following pairs, the blue and orange bars must have equal lengths.</p>

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

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

   <!-- ZERO-WIDTH NON-JOINER -->
   <div class="ws-normal">
     <p class="control"><span>A&#x200C;&#x200C;&#x200C;&#x200C;B</span></p>
     <p class="test"><span>A&#x200C;&#x200C;&#x200C;&#x200C;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x200C;&#x200C;&#x200C;&#x200C;B</span></p>
     <p class="test"><span>A&#x200C;&#x200C;&#x200C;&#x200C;B</span></p>
   </div>

   <!-- ZERO-WIDTH JOINER -->
   <div class="ws-normal">
     <p class="control"><span>A&#x200D;&#x200D;&#x200D;&#x200D;B</span></p>
     <p class="test"><span>A&#x200D;&#x200D;&#x200D;&#x200D;B</span></p>
   </div>
   <div class="ws-pre">
     <p class="control"><span>A&#x200D;&#x200D;&#x200D;&#x200D;B</span></p>
     <p class="test"><span>A&#x200D;&#x200D;&#x200D;&#x200D;B</span></p>
   </div>

 </body>
</html>