clip-path-polygon-010.html (1519B)
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 fill-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. 'fill-box' was specified but is not supported for HTML 16 elements. The used value should be 'border-box' for the polygon() function 17 instead. By mixing percentage and absolute values as coordinates we check 18 the correct used reference box. On sucess you should see a green 19 vertical stripe next to a lime green vertical stripe. Both should be of equal 20 size."> 21 <style> 22 div { 23 width: 50px; 24 height: 50px; 25 background-color: green; 26 padding: 25px; 27 margin: 25px; 28 border: red solid 50px; 29 border-left: lime solid 50px; 30 } 31 </style> 32 <body> 33 <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> 34 <div style="clip-path: polygon(-75px -50%, 50% -25px, 25px 150%, -75px 75px) 35 fill-box"></div> 36 </body> 37 </html>