clip-path-stripes-001-ref.html (1422B)
1 <!-- 2 Any copyright is dedicated to the Public Domain. 3 http://creativecommons.org/publicdomain/zero/1.0/ 4 --> 5 <!DOCTYPE html> 6 <html> 7 <head> 8 <title>CSS Masking: Test clip-path and polygon with border-box</title> 9 <link rel="author" title="Dirk Schulze" href="mailto:dschulze@adobe.com"> 10 <link rel="help" href="http://www.w3.org/TR/css-masking-1/#clipping-paths"> 11 <link rel="help" href="http://www.w3.org/TR/css-masking-1/#propdef-clip-path"> 12 <link rel="match" href="clip-path-stripes-001-ref.html"> 13 <meta name="assert" content="The clip-path property allows specifying 14 basic shapes and reference boxes. This test checks the usage of the correct 15 reference box 'border-box' for the polygon() function by mixing percentage 16 and absolute values as coordinates. On sucess you should see a green 17 vertical stripe next to a lime green vertical stripe. Both should be of equal 18 size."> 19 <style> 20 div { 21 width: 50px; 22 height: 50px; 23 background-color: green; 24 padding: 25px; 25 margin: 25px; 26 border: red solid 50px; 27 border-left: lime solid 50px; 28 } 29 </style> 30 <body> 31 <p>The test passes if you see a green vertical stripe next to a lime green vertical stripe, both stripes should be of equal size and there should be no red.</p> 32 <div style="clip-path: url(#c1)"></div> 33 <svg> 34 <clipPath id="c1"> 35 <rect x="0" y="50" width="100" height="100"/> 36 </clipPath> 37 </svg> 38 </body> 39 </html>