Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

SVG Preview (Scaled)

Preview of https://hg.mozilla.org/mozilla-central/raw-file/tip/testing/web-platform/tests/css/css-masking/clip-path-svg-content/clip-path-css-transform-002.svg
<g id="testmeta">
<title>CSS Masking: clipPath with CSS Transforms and 2nd content element</title>
<html:link rel="author" title="Dirk Schulze" href="mailto:dschulze@adobe.com"/>
<html:link rel="match" href="reference/clip-path-square-002-ref.svg" />
<metadata class="flags">svg</metadata>
<desc class="assert">CSS Transforms must apply on the clipPath
element. This example adds a second content element since that may
cause masking in some implementations. A green square should be
visible.</desc>
</g>
<clipPath id="clip1" style="transform: scale(10) translate(5px, 5px);">
<rect width="10" height="10"/>
<!-- Second rect may cause masking -->
<rect width="5" height="4"/>
</clipPath>
<rect width="200" height="200" fill="green" clip-path="url(#clip1)"/>
</svg>