OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 window.onload = function() { | 5 window.onload = function() { |
6 // fetch offsetTop to force a layout | 6 // fetch offsetTop to force a layout |
7 document.body.offsetTop; | 7 document.body.offsetTop; |
8 | 8 |
9 var el = document.querySelector('#add-shape-outside .shape'); | 9 var el = document.querySelector('#add-shape-outside .shape'); |
10 el.className = 'shape rectangle50'; | 10 el.className = 'shape rectangle50'; |
(...skipping 29 matching lines...) Expand all Loading... |
40 position: absolute; | 40 position: absolute; |
41 display: block; | 41 display: block; |
42 top: 0px; left: 0px; | 42 top: 0px; left: 0px; |
43 width: 100%; | 43 width: 100%; |
44 height: 100%; | 44 height: 100%; |
45 background-color: blue; | 45 background-color: blue; |
46 content: ' '; | 46 content: ' '; |
47 } | 47 } |
48 | 48 |
49 .rectangle50 { | 49 .rectangle50 { |
50 shape-outside: rectangle(0, 0, 50px, 50px); | 50 shape-outside: polygon(0px 0px, 50px 0px, 50px 50px, 0px 50px); |
51 } | 51 } |
52 .rectangle50::before { | 52 .rectangle50::before { |
53 width: 50px; | 53 width: 50px; |
54 height: 50px; | 54 height: 50px; |
55 } | 55 } |
56 | 56 |
57 .rectangle25 { | 57 .rectangle25 { |
58 shape-outside: rectangle(0, 0, 25px, 25px); | 58 shape-outside: polygon(0px 0px, 25px 0px, 25px 25px, 0px 25px); |
59 } | 59 } |
60 .rectangle25::before { | 60 .rectangle25::before { |
61 width: 25px; | 61 width: 25px; |
62 height: 25px; | 62 height: 25px; |
63 } | 63 } |
64 </style> | 64 </style> |
65 </head> | 65 </head> |
66 <body> | 66 <body> |
67 <p>When shape-outside is modified dynamically, content affected by the shape
's contour should relayout. This test is for shape-outside floats that overhang
their parent container. For each test, you should see green blocks separated by
white space, wrapping around a blue square in the upper left. This test requires
the Ahem font.</p> | 67 <p>When shape-outside is modified dynamically, content affected by the shape
's contour should relayout. This test is for shape-outside floats that overhang
their parent container. For each test, you should see green blocks separated by
white space, wrapping around a blue square in the upper left. This test requires
the Ahem font.</p> |
68 | 68 |
69 <p>Setting shape-outside with no prior entry</p> | 69 <p>Setting shape-outside with no prior entry</p> |
70 <div id='add-shape-outside' class='container'><div class='shape-wrapper'><di
v class='shape'></div></div>x x x x x x x x x x</div> | 70 <div id='add-shape-outside' class='container'><div class='shape-wrapper'><di
v class='shape'></div></div>x x x x x x x x x x</div> |
71 | 71 |
72 <p>Setting shape-outside with a prior entry</p> | 72 <p>Setting shape-outside with a prior entry</p> |
73 <div id='change-shape-outside' class='container'><div class='shape-wrapper'>
<div class='shape rectangle50'></div></div>x x x x x x x x x x</div> | 73 <div id='change-shape-outside' class='container'><div class='shape-wrapper'>
<div class='shape rectangle50'></div></div>x x x x x x x x x x</div> |
74 | 74 |
75 <p>Removing shape-outside with a prior entry</p> | 75 <p>Removing shape-outside with a prior entry</p> |
76 <div id='remove-shape-outside' class='container'><div class='shape-wrapper'>
<div class='shape rectangle50'></div></div>x x x x x x x x x x</div> | 76 <div id='remove-shape-outside' class='container'><div class='shape-wrapper'>
<div class='shape rectangle50'></div></div>x x x x x x x x x x</div> |
77 </body> | 77 </body> |
78 </html> | 78 </html> |
OLD | NEW |