Status: FAIL | Duration: 11ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-shadow/svg-id-ref-001.html
<!DOCTYPE html> <title>Same clip-path id's in different tree scopes</title> <link rel="help" href="https://drafts.csswg.org/css-values/#local-urls"> <link rel="help" href="https://drafts.csswg.org/css-shadow-1/#css-tree-scoped-reference"> <link rel="match" href="reference/green-box.html"> <style> div.container { position: absolute; width: 100px; height: 100px; } div.one { background-color: red; } </style> <p>Test passes if you see a single 100px by 100px green box below.</p> <div class="container one"> <svg style="display: block; width: 100%; height: 100%"> <rect width="100" height="100" fill="green" clip-path="url(#clip)"/> <clipPath id="clip"> <rect width="50" height="100"/> </clipPath> </svg> </div> <div class="container two"></div> <script> const scoped = document.querySelector('div.two'); scoped.attachShadow({ mode: 'open' }); scoped.shadowRoot.innerHTML = ` <svg style="display: block; width: 100%; height: 100%"> <rect width="100" height="100" fill="green" clip-path="url(#clip)"/> <clipPath id="clip"> <rect x="50" width="50" height="100"/> </clipPath> </svg>`; </script>
/css/css-shadow/reference/green-box.html
<!DOCTYPE html> <html> <head> <title>CSS Scoping Module Level 1 - A green box reference</title> <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/> </head> <body> <p>Test passes if you see a single 100px by 100px green box below.</p> <div style="width: 100px; height: 100px; background: green;"></div> </body> </html>