white-space-normal-007

white-space normal: zero width non-breaking space

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <!-- ================================================================ -->
 4  <!-- WARNING! This document contains significant trailing whitespace! -->
 5  <!-- ================================================================ -->
 6  <head>
 7   <title>CSS Test: white-space normal: zero width non-breaking space</title>
 8   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 9   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/text/white-space/normal/007.html" type="text/html">
10   <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#white-space-model">
11   <style type="text/css">
12    /* setup */
13    .control { display: inline; font: 1em/1 Ahem, sans-serif; background: red; color: white; }
14    * { white-space: normal; font: inherit; }
15    div { display: block; margin: 1em; }
16    span { display: inline; }
17 
18    /* test */
19    div { font: 20px/1 Ahem; }
20    .green { background: lime; color: green; }
21    .red { background: red; color: maroon; }
22   </style>
23  </head>
24  <body>
25   <div class="control">Ahem_font_required_for_this_test.</div>
26   <p>There should be no red below, only three identical striped green and lime bars.</p>
27 
28   <!-- the next two tests are identical, but one uses raw data and the other uses entities -->
29 
30   <div><span class="red">
31 
32    <span class="green">X <span class="red"><span class="red"> <span class="red">
33    </span></span> </span>X <span class="red"> 
34    </span>X<span class="red"><span class="red"><span class="green"> </span><span class="red"> </span></span> </span>X
35 <span class="red"> 
36    
37    </span>
38    <span class="green">X<span class="green"> <span class="red"> </span></span><span class="red"> </span>X<span class="red">
39 
40   </span></span></span></span></div>
41 
42   <div><span class="red">
43 
44    <span class="green">X <span class="red"><span class="red"> <span class="red">
45    </span></span> </span>X <span class="red"> 
46    </span>X<span class="red"><span class="red"><span class="green"> </span><span class="red"> </span></span> </span>X
47 <span class="red"> 
48    
49    </span>
50    <span class="green">X<span class="green"> <span class="red"> </span></span><span class="red"> </span>X<span class="red">
51 
52   </span></span></span></span></div>
53 
54   <div><span class="green">X X X X X X</span></div>
55 
56  </body>
57 </html>