OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>CSS Test: right float, polygon + content-box + shape-margin</titl
e> | 4 <title>CSS Test: left float, polygon, args in px units</title> |
5 <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> | 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/#funcdef-polygo
n"> | 6 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#funcdef-polygo
n"> |
7 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-
property"> | 7 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-
property"> |
8 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#content-box"> | 8 <link rel="match" href="reference/shape-outside-polygon-007-ref.html"> |
9 <link rel="match" href="reference/shape-outside-polygon-010-ref.html"> | |
10 <meta name="flags" content="ahem" /> | 9 <meta name="flags" content="ahem" /> |
11 <meta name="assert" content="The test verifies that text wraps around a | 10 <meta name="assert" content="The test verifies that text wraps around a |
12 right float with a shape-outside defined as | 11 left float with a shape-outside defined as |
13 an polygon from the content box wtih a shap
e margin."> | 12 an polygon with the args in px units."> |
14 </head> | 13 </head> |
15 <style> | 14 <style> |
16 body { | 15 body { |
17 margin: 0; | 16 margin: 0; |
18 } | 17 } |
19 #container { | 18 #container { |
20 position: absolute; | 19 position: absolute; |
21 top: 50px; | 20 top: 50px; |
22 left: 10px; | 21 left: 10px; |
23 font-size: 20px; | 22 font-size: 20px; |
24 font-family: Ahem; | 23 font-family: Ahem; |
25 line-height: 20px; | 24 line-height: 20px; |
26 width: 240px; | 25 width: 200px; |
27 height: 240px; | 26 height: 200px; |
28 background-color: red; | 27 background-color: red; |
29 color: green; | 28 color: green; |
30 } | 29 } |
31 #test-shape { | 30 #test-shape { |
32 float: right; | 31 float: left; |
33 width: 200px; | 32 width: 200px; |
34 height: 200px; | 33 height: 200px; |
35 margin: 5px; | 34 shape-outside: polygon(0px 40px, 120px 40px, 120px 80px, 80px 80px,
80px 120px, 160px 120px, 160px 160px, 0px 160px); |
36 border: 10px solid transparent; | |
37 padding: 5px; | |
38 shape-margin: 20px; | |
39 shape-outside: content-box polygon(30% 20%, 100% 20%, 100% 80%, 60%
80%, 60% 70%, 80% 70%, 80% 40%, 30% 40%); | |
40 } | 35 } |
41 .ref-shape { | 36 .ref-shape { |
42 position: absolute; | 37 position: absolute; |
| 38 left: 10px; |
43 background-color: green; | 39 background-color: green; |
| 40 height: 40px; |
44 } | 41 } |
45 #ref-1 { | 42 #ref-1 { |
46 top: 90px; | 43 top: 90px; |
47 left: 70px; | 44 width: 120px; |
48 width: 180px; | |
49 height: 80px; | |
50 } | 45 } |
51 #ref-2 { | 46 #ref-2 { |
52 top: 170px; | 47 top: 130px; |
53 left: 170px; | |
54 width: 80px; | 48 width: 80px; |
55 height: 20px; | |
56 } | 49 } |
57 #ref-3 { | 50 #ref-3 { |
58 top: 190px; | 51 top: 170px; |
59 left: 130px; | 52 width: 160px; |
60 width: 120px; | |
61 height: 60px; | |
62 } | 53 } |
63 </style> | 54 </style> |
64 <body> | 55 <body> |
65 <p>The test passes if there is green square and no red.</p> | 56 <p>The test passes if there is green square and no red.</p> |
66 <div id="container"> | 57 <div id="container"> |
67 <div id="test-shape"></div> | 58 <div id="test-shape"></div> |
68 XXXXXXXXXXXX XXXXXXXXXXXX XXX XXX XXX XXX XXXXXXXX XXXXXX XXXXXX XXXXXX
XXXXXXXXXXXX XXXXXXXXXXXX | 59 XXXXXXXXXX XXXXXXXXXX XXXX XXXX XXXXXX XXXXXX XX XX XXXXXXXXXX XXXXXXXXX
X |
69 </div> | 60 </div> |
70 <div id="ref-1" class="ref-shape"></div> | 61 <div id="ref-1" class="ref-shape"></div> |
71 <div id="ref-2" class="ref-shape"></div> | 62 <div id="ref-2" class="ref-shape"></div> |
72 <div id="ref-3" class="ref-shape"></div> | 63 <div id="ref-3" class="ref-shape"></div> |
73 </body> | 64 </body> |
74 </html> | 65 </html> |
OLD | NEW |