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