OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>CSS Test: Shape from image - alpha channel, opacity > 0 + shape-margi
n</title> |
| 5 <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"/> |
| 6 <link rel="author" title="Bem Jones-Bey" href="mailto:bemjb@adobe.com"/> |
| 7 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shapes-from-image"
/> |
| 8 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-prop
erty"/> |
| 9 <meta name="flags" content="ahem dom"/> |
| 10 <meta name="assert" content="This test verifies that the content flows aroun
d the |
| 11 shape defined in the images alpha channel and t
he shape-margin."/> |
| 12 <!-- This test is derived from Example 11 in this version of the spec: |
| 13 http://www.w3.org/TR/2014/WD-css-shapes-1-20140211/ --> |
| 14 <style type="text/css"> |
| 15 #test { |
| 16 position: relative; |
| 17 color: green; |
| 18 width: 400px; |
| 19 font-family: Ahem; |
| 20 font-size: 20px; |
| 21 line-height: 2em; |
| 22 } |
| 23 #image { |
| 24 float: left; |
| 25 shape-outside: url("support/circle-shadow.png"); |
| 26 shape-margin: 20px; |
| 27 } |
| 28 #margin-circle { |
| 29 position: absolute; |
| 30 top: 0px; |
| 31 left: 0px; |
| 32 width: 300px; |
| 33 height: 300px; |
| 34 background-color: black; |
| 35 clip-path: ellipse(141px 127px at 115px 100px); |
| 36 z-index: -1; |
| 37 } |
| 38 </style> |
| 39 <script src="../../../../resources/testharness.js"></script> |
| 40 <script src="../../../../resources/testharnessreport.js"></script> |
| 41 <script src="support/spec-example-utils.js"></script> |
| 42 </head> |
| 43 <body> |
| 44 <p> |
| 45 The test passes if the short green horizontal bars are the right of the
black edge |
| 46 of circle, the long green bar is beneath it, and no bars intersect the b
lack. |
| 47 There should be no red. |
| 48 </p> |
| 49 <div id="test"> |
| 50 <img id="image" src="support/circle-shadow.png"/> |
| 51 <div id="margin-circle"></div> |
| 52 <span id="line-0">XXXXXX</span> |
| 53 <span id="line-1">XXXXXX</span> |
| 54 <span id="line-2">XXXXXX</span> |
| 55 <span id="line-3">XXXXXX</span> |
| 56 <span id="line-4">XXXXXX</span> |
| 57 <span id="line-5">XXXXXX</span> |
| 58 <span id="line-6">XXXXXXXXXXXXXXX</span> |
| 59 </div> |
| 60 <div id="log"></div> |
| 61 <script> |
| 62 approxShapeTest('test', 'line-', 2, [242, 256, 258, 256, 242, 204, 0]); |
| 63 </script> |
| 64 </body> |
| 65 </html> |
OLD | NEW |