OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>CSS Test: Shape from box value - margin-box</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-box-va
lues"/> |
| 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 content wraps around a
shape |
| 11 defined by its margin box."/> |
| 12 <!-- This test is derived from Examples 8 and 9 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 color: green; |
| 17 position: relative; |
| 18 width: 400px; |
| 19 font-family: Ahem; |
| 20 font-size: 20px; |
| 21 line-height: 2em; |
| 22 } |
| 23 #box { |
| 24 float: left; |
| 25 width: 120px; |
| 26 height: 120px; |
| 27 background-color: lightblue; |
| 28 margin: 40px; |
| 29 border-radius: 90px; |
| 30 shape-outside: margin-box; |
| 31 } |
| 32 #border-shape { |
| 33 position: absolute; |
| 34 top: 0px; |
| 35 left: 0px; |
| 36 width: 160px; |
| 37 height: 160px; |
| 38 background-color: lightblue; |
| 39 border: 20px solid lightblue; |
| 40 border-radius: 90px; |
| 41 z-index: -1; |
| 42 } |
| 43 </style> |
| 44 <script src="../../../../resources/testharness.js"></script> |
| 45 <script src="../../../../resources/testharnessreport.js"></script> |
| 46 <script src="support/spec-example-utils.js"></script> |
| 47 </head> |
| 48 <body> |
| 49 <p> |
| 50 The test passes if the short green horizontal bars are the right of the
shape, |
| 51 the long green bar is beneath it, and no bars intersect it. There should
be no red. |
| 52 </p> |
| 53 <div id="test" class="container"> |
| 54 <div id="box"></div> |
| 55 <div id="border-shape"></div> |
| 56 <span id="line-0">XXXXXX</span> |
| 57 <span id="line-1">XXXXXX</span> |
| 58 <span id="line-2">XXXXXX</span> |
| 59 <span id="line-3">XXXXXX</span> |
| 60 <span id="line-4">XXXXXX</span> |
| 61 <span id="line-5">XXXXXXXXXXXXXXX</span> |
| 62 </div> |
| 63 <div id="log"></div> |
| 64 <script> |
| 65 approxShapeTest('test', 'line-', 3, [182, 198, 200, 198, 182, 0]); |
| 66 </script> |
| 67 </body> |
| 68 </html> |
OLD | NEW |