clip-path-polygon-010.html (1372B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Masking: Test clip-path and polygon with fill-box</title> 5 <link rel="author" title="Dirk Schulze" href="mailto:dschulze@adobe.com"> 6 <link rel="help" href="http://www.w3.org/TR/css-masking-1/#clipping-paths"> 7 <link rel="help" href="http://www.w3.org/TR/css-masking-1/#propdef-clip-path"> 8 <link rel="match" href="reference/clip-path-stripes-001-ref.html"> 9 <meta name="assert" content="The clip-path property allows specifying 10 basic shapes and reference boxes. This test checks the usage of the correct 11 reference box. 'fill-box' was specified but is not supported for HTML 12 elements. The used value should be 'content-box' for the polygon() function 13 instead. By mixing percentage and absolute values as coordinates we check 14 the correct used reference box. On success you should see a green 15 vertical stripe next to a lime green vertical stripe. Both should be of equal 16 size."> 17 <style> 18 div { 19 width: 50px; 20 height: 50px; 21 background-color: green; 22 padding: 25px; 23 margin: 25px; 24 border: red solid 50px; 25 border-left: lime solid 50px; 26 } 27 </style> 28 <body> 29 <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> 30 <div style="clip-path: polygon(-75px -50%, 50% -25px, 25px 150%, -75px 75px) fill-box"></div> 31 </body> 32 </html>