OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <style id='stylesheet'> | |
5 .shape-inside { | |
6 font: 50px/1 Ahem, sans-serif; | |
7 color: green; | |
8 float: left; | |
9 } | |
10 .horizontal.tb { | |
11 -webkit-writing-mode: horizontal-tb; | |
12 } | |
13 .vertical.rl { | |
14 -webkit-writing-mode: vertical-rl; | |
15 } | |
16 .vertical.lr { | |
17 -webkit-writing-mode: vertical-lr; | |
18 } | |
19 .shape-inside * { | |
20 padding: 5px 10px 15px 20px; | |
21 } | |
22 </style> | |
23 <script src='../resources/simple-rectangle.js'></script> | |
24 <script> | |
25 window.onload = function() { | |
26 ids = [ | |
27 'shape-inside', | |
28 'shape-inside-rl', | |
29 'shape-inside-lr', | |
30 'shape-inside-tb-lr-tb', | |
31 'shape-inside-lr-rl-lr' | |
32 ]; | |
33 ids.forEach(function(id) { | |
34 createRectangleTest(id, 'stylesheet', { width: 300, height: 300 }, { x:
100, y: 100, width: 100, height: 100 }, 'px', null); | |
35 }); | |
36 } | |
37 </script> | |
38 </head> | |
39 <body> | |
40 <p>This test ensures that shape-inside takes into account padding on nested chil
d blocks in different writing modes. You should see several green squares within
a blue outline. The test requires the Ahem font.</p> | |
41 <div id='shape-inside' class='shape-inside'><div><div>xxxx</div></div></div> | |
42 <div id='shape-inside-rl' class='shape-inside vertical lr'><div><div>xxxx</div><
/div></div> | |
43 <div id='shape-inside-lr' class='shape-inside vertical rl'><div><div>xxxx</div><
/div></div> | |
44 <div id='shape-inside-tb-lr-tb' class='shape-inside'><div class='vertical lr'><d
iv class='horizontal tb'>xxxx</div></div></div> | |
45 <div id='shape-inside-lr-rl-lr' class='shape-inside vertical rl'><div class='ver
tical lr'><div class='vertical rl'>xxxx</div></div></div> | |
46 </body> | |
47 </html> | |
OLD | NEW |