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;
45 background-color: blue;
50 shape-outside: polygon(
0px
0px,
50px
0px,
50px
50px,
0px
50px);
52 .rectangle50::before {
58 shape-outside: polygon(
0px
0px,
25px
0px,
25px
25px,
0px
25px);
60 .rectangle25::before {
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>
69 <p>Setting shape-outside with no prior entry
</p>
70 <div id='add-shape-outside' class='container'
><div class='shape-wrapper'
><div class='shape'
></div></div>x x x x x x x x x x
</div>
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>
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>