OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>CSS Test: Shape from box value - padding-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 padding 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 width: 400px; |
| 18 font-family: Ahem; |
| 19 font-size: 20px; |
| 20 line-height: 2em; |
| 21 } |
| 22 #box { |
| 23 float: left; |
| 24 width: 120px; |
| 25 height: 120px; |
| 26 background-color: lightblue; |
| 27 padding: 40px; |
| 28 border-radius: 90px; |
| 29 shape-outside: padding-box; |
| 30 } |
| 31 </style> |
| 32 <script src="../../../../resources/testharness.js"></script> |
| 33 <script src="../../../../resources/testharnessreport.js"></script> |
| 34 <script src="support/spec-example-utils.js"></script> |
| 35 </head> |
| 36 <body> |
| 37 <p> |
| 38 The test passes if the short green horizontal bars are the right of the
shape, |
| 39 the long green bar is beneath it, and no bars intersect it. There should
be no red. |
| 40 </p> |
| 41 <div id="test"> |
| 42 <div id="box"></div> |
| 43 <span id="line-0">XXXXXX</span> |
| 44 <span id="line-1">XXXXXX</span> |
| 45 <span id="line-2">XXXXXX</span> |
| 46 <span id="line-3">XXXXXX</span> |
| 47 <span id="line-4">XXXXXX</span> |
| 48 <span id="line-5">XXXXXXXXXXXXXXX</span> |
| 49 </div> |
| 50 <div id="log"></div> |
| 51 <script> |
| 52 approxShapeTest('test', 'line-', 2, [185, 199, 200, 199, 185, 0]); |
| 53 </script> |
| 54 </body> |
| 55 </html> |
OLD | NEW |