Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>'mix-blend-mode' inside SVG elements that establish a stacking context</title>
<link rel="author" title="Nikolas Zimmermann" href="mailto:nzimmermann@igalia.com">
<link rel="match" href="blending-svg-root-ref.html">
<meta name="assert" content="SVG elements that establish a stacking context without a grouping property do not create an isolated group, so blending descendants blend with the content behind the 'svg' element.">
<div style="background: green">
<div>Expected: a black square on green background.</div>
<svg style="width: 200px; height: 200px">
<defs>
<rect id="rect" width="100" height="100" fill="red" style="mix-blend-mode: multiply"/>
<symbol id="symbol" width="100" height="100">
<rect width="100" height="100" fill="red" style="mix-blend-mode: multiply"/>
</symbol>
</defs>
<g style="z-index: 1">
<rect width="100" height="100" fill="red" style="mix-blend-mode: multiply"/>
</g>
<use href="#rect" x="100"/>
<use href="#symbol" y="100"/>
<svg x="100" y="100" width="100" height="100" overflow="hidden">
<rect width="100" height="100" fill="red" style="mix-blend-mode: multiply"/>
</svg>
</svg>
</div>