clip-path-url-reference-svg-foreignobject-zoomed.html (785B)
1 <!doctype html> 2 <title>CSS Masking: clip-path, <clipPath> with objectBoundingBox units on a foreignObject</title> 3 <link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-clip-path"> 4 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1512077"> 5 <link rel="match" href="reference/green-100x100.html"> 6 <style> 7 #clipped { 8 background: green; 9 width: 50px; 10 height: 50px; 11 border-bottom: 50px solid red; 12 border-right: 50px solid red; 13 } 14 </style> 15 <svg style="zoom: 2"> 16 <rect width="50" height="50" fill="red"/> 17 <clipPath id="c" clipPathUnits="objectBoundingBox"> 18 <rect width=".5" height=".5"/> 19 </clipPath> 20 <foreignObject clip-path="url(#c)" width="100" height="100"> 21 <div id="clipped"></div> 22 </foreignObject> 23 </svg>