Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / imported / csswg-test / css-shapes-1 / spec-examples / shape-outside-001.html
blob3a51609a02d58ab28c62e308aef94e266e9c1976
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>CSS Test: Left and right float with shape-outside</title>
5 <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"/>
6 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#relation-to-box-model-and-float-behavior"/>
7 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#supported-basic-shapes"/>
8 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"/>
9 <link rel="match" href="reference/shape-outside-001-ref.html"/>
10 <meta name="flags" content="ahem"/>
11 <meta name="assert" content="This test verifies that left floats with a shape-outside
12 only allow content wrapping on the right side, and right floats only allow wrapping on
13 the left."/>
14 <!-- This test is derived from Example 1 in this version of the spec:
15 http://www.w3.org/TR/2013/WD-css-shapes-1-20131203/ -->
16 <style type="text/css">
17 body {
18 margin-left: 0;
20 .container {
21 width: 400px;
22 text-align: center;
23 font-family: Ahem;
24 font-size: 20px;
25 line-height: 1em;
27 #test {
28 color: green;
30 #test-float-left {
31 shape-outside: polygon(0 0, 200px 200px, 0 200px);
32 float: left;
33 width: 200px;
34 height: 200px;
36 #test-float-right {
37 shape-outside: polygon(200px 0, 200px 200px, 0 200px);
38 float: right;
39 width: 200px;
40 height: 200px;
42 #failure-container {
43 color: red;
44 z-index: -1;
46 #test, #failure-container {
47 position: absolute;
48 top: 60px;
50 .line {
51 height: 20px;
53 #bottom {
54 position: absolute;
55 top: 200px;
57 #left-triangle, #right-triangle {
58 position: absolute;
59 top: 60px;
60 width: 200px;
61 height: 200px;
62 background-color: lightblue;
64 #left-triangle {
65 clip-path: polygon(0 0, 200px 200px, 0 200px);
67 #right-triangle {
68 left: 200px;
69 clip-path: polygon(200px 0, 200px 200px, 0 200px);
71 </style>
72 </head>
73 <body>
74 <p>
75 The test passes if the green shape does not intersect either of the triangles and
76 there is one green horizontal bar beneath the triangles. There should be no red.
77 </p>
78 <div id="test" class="container">
79 <div id="test-float-left"></div>
80 <div id="test-float-right"></div>
81 XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXX
82 XXXXXXXXXXX XXXXXXXXX XXXXXXX XXXXX XXX X
83 XXXXXXXXXXXXXXXXX
84 </div>
85 <div id="failure-container">
86 <div class="line container">XXXXXXXXXXXXXXXXX</div>
87 <div class="line container">XXXXXXXXXXXXXXX</div>
88 <div class="line container">XXXXXXXXXXXXX</div>
89 <div class="line container">XXXXXXXXXXX</div>
90 <div class="line container">XXXXXXXXX</div>
91 <div class="line container">XXXXXXX</div>
92 <div class="line container">XXXXX</div>
93 <div class="line container">XXX</div>
94 <div class="line container">X</div>
95 <div class="line container" id="bottom">XXXXXXXXXXXXXXXXX</div>
96 </div>
97 <div id="left-triangle"></div>
98 <div id="right-triangle"></div>
99 </body>
100 </html>