Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / imported / csswg-test / css-shapes-1 / spec-examples / shape-outside-007.html
blobf89136ee1441c289d2c4add63572282a71f5ef21
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>CSS Test: Shape smaller than float content area - 1 float</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-007-ref.html"/>
10 <meta name="flags" content="ahem"/>
11 <meta name="assert" content="This test verifies that inline content only wraps around the
12 shape, and otherwise overlays the rest of the float margin
13 box"/>
14 <!-- This test is derived from Example 5 in this version of the spec:
15 http://www.w3.org/TR/2013/WD-css-shapes-1-20131203/ -->
16 <style type="text/css">
17 .container {
18 width: 260px;
19 font-family: Ahem;
20 font-size: 20px;
21 line-height: 1.5em;
22 border: 1px solid black;
23 padding-left: 2px;
25 #test {
26 color: green;
28 #test-float-left {
29 shape-outside: polygon(0 70px, 50px 120px, 0 120px);
30 float: left;
31 width: 100px;
32 height: 100px;
33 margin-top: 20px;
35 #test, #failure-container {
36 position: absolute;
37 top: 70px;
39 #margin-line {
40 position: absolute;
41 top: 100px;
42 width: 263px;
43 border-bottom: 1px solid black;
45 .fail {
46 position: absolute;
47 height: 20px;
48 background-color: red;
49 z-index: -1;
51 #bar-1 {
52 top: 6px;
53 left: 3px;
54 width: 240px;
56 #bar-2 {
57 top: 36px;
58 left: 3px;
59 width: 240px;
61 #bar-3 {
62 top: 66px;
63 left: 23px;
64 width: 220px;
66 #bar-4 {
67 top: 96px;
68 left: 53px;
69 width: 200px;
71 #triangle {
72 position: absolute;
73 top: 90px;
74 width: 100px;
75 height: 100px;
76 background-color: lightblue;
77 margin-left: 2px;
78 clip-path: polygon(0% 50%, 50% 100%, 0 100%);;
81 </style>
82 </head>
83 <body>
84 <p>
85 The test passes if one green bar is inside the top rectangle, three green bars
86 are in the bottom rectangle, and none intersect the triangle. There should be no red.
87 </p>
88 <div id="test" class="container">
89 <div id="test-float-left"></div>
90 XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXX
91 </div>
92 <div id="margin-line"></div>
93 <div id="failure-container">
94 <div id="bar-1" class="fail"></div>
95 <div id="bar-2" class="fail"></div>
96 <div id="bar-3" class="fail"></div>
97 <div id="bar-4" class="fail"></div>
98 </div>
99 <div id="triangle"></div>
100 </body>
101 </html>