5 window
.onload = function() {
6 // fetch offsetTop to force a layout
7 document
.body
.offsetTop
;
9 var el
= document
.querySelector('#add-shape-outside .shape');
10 el
.className
= 'shape rectangle50';
12 el
= document
.querySelector('#change-shape-outside .shape');
13 el
.className
= 'shape rectangle25';
15 el
= document
.querySelector('#remove-shape-outside .shape');
16 el
.className
= 'shape';
23 overflow-wrap: break-word;
24 border:
2px solid blue;
25 font:
50px/
1 Ahem, sans-serif;
41 background-color: blue;
46 shape-outside: polygon(
0px
0px,
50px
0px,
50px
50px,
0px
50px);
48 .rectangle50::before {
54 shape-outside: polygon(
0px
0px,
25px
0px,
25px
25px,
0px
25px);
56 .rectangle25::before {
63 <p>When shape-outside is modified dynamically, content affected by the shape's contour should relayout. 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>
65 <p>Setting shape-outside with no prior entry
</p>
66 <div id='add-shape-outside' class='container'
><div class='shape'
></div>x x x x x x x x x x
</div>
68 <p>Setting shape-outside with a prior entry
</p>
69 <div id='change-shape-outside' class='container'
><div class='shape rectangle50'
></div>x x x x x x x x x x
</div>
71 <p>Removing shape-outside with a prior entry
</p>
72 <div id='remove-shape-outside' class='container'
><div class='shape rectangle50'
></div>x x x x x x x x x x
</div>