before-after-table-parts-001

generated content

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html><head>
 3     <link rel="reference" href="before-after-table-parts-001-ref.xht">
 4     <title>CSS Test: generated content</title>
 5     <link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org">
 6     <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
 7     <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#before-after-content">
 8     <meta name="flags" content="">
 9 <style type="text/css">
10 table, div.gen { counter-reset:ctr; quotes:"\0022" "\0022" "\0022" "\0022"; }
11 
12 .gen:before {
13   content:counter(ctr) url(support/square-outline-32x32.png) open-quote "Before " attr(class);
14   counter-increment:ctr;
15 }
16 .gen:after {
17   content:counter(ctr) url(support/square-outline-32x32.png) "After " attr(class) close-quote;
18   counter-increment:ctr;
19 }
20 
21 table { border:1px solid blue; }
22 td { border:1px solid cyan; }
23 td { border-spacing:0; padding:0; }
24 
25 tr.gen:before, tr.gen:after { display:table-cell; }
26 tbody.gen:before, tbody.gen:after { display:table-row; }
27 table.gen:before, table.gen:after { display:table-row-group; }
28 table.col:before, table.gen.col:after { display:table-column-group; }
29 /* note reordering here! */
30 table.headfoot:after { display:table-header-group; }
31 table.headfoot:before { display:table-footer-group; }
32 
33 .cell { display:table-cell; }
34 .row { display:table-row; }
35 .rowgroup { display:table-row-group; }
36 .table { display:table; }
37 div.gencell:before, div.gencell:after { display:table-cell; }
38 div.genrow:before, div.genrow:after { display:table-row; }
39 div.genblock:before, div.genblock:after { display:block; }
40 div.geninline:before, div.geninline:after { display:inline; }
41 
42 div { border:1px solid green; margin:5px; }
43 
44 .varyheight:before { height:100px; background:yellow; }
45 .varyheight > div { height:80px; background:orange; }
46 .varyheight:after { height:60px; background:brown; }
47 
48 .varywidth:before { background:yellow; }
49 .varywidth > div { background:orange; }
50 .varywidth:after { background:brown; }
51 </style>
52 </head>
53 
54 <body>
55 <table width="100%" style="border:none"><tbody><tr><td style="border:none" valign="top">
56   <div><table><tbody><tr class="gen"><td>Inner</td></tr></tbody></table></div>
57   <div><table><tbody class="gen"><tr><td>Inner</td></tr></tbody></table></div>
58   <div><table class="gen"><tfoot><tr><td>Inner</td></tr></tfoot></table></div>
59   <div><table class="gen col"><tbody><tr><td>Inner</td></tr></tbody></table></div>
60   <div><table class="gen headfoot"><tbody><tr><td>Inner</td></tr></tbody></table></div>
61   <div><div class="gen table gencell varyheight"><div class="cell">Inner</div></div></div>
62   <div><div class="gen gencell varyheight"><div class="cell">Inner</div></div></div>
63   <div><div class="gen genrow varywidth"><div class="row">Inner</div></div></div>
64 </td><td style="border:none" valign="top">
65   <div><div class="gen row gencell"><div class="cell">Inner</div></div></div>
66   <div><div class="gen row genblock"><div class="cell">Inner</div></div></div>
67   <div><div class="gen row geninline"><div class="cell">Inner</div></div></div>
68   <div><div class="gen rowgroup genrow"><div class="row"><div class="cell">Inner</div></div></div></div>
69   <div><div class="gen rowgroup gencell"><div class="row"><div class="cell">Inner</div></div></div></div>
70   <div><div class="gen rowgroup genblock"><div class="row"><div class="cell">Inner</div></div></div></div>
71   <div><div class="gen rowgroup geninline"><div class="row"><div class="cell">Inner</div></div></div></div>
72 </td></tr></tbody></table>
73 
74 
75 </body></html>