Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/styling/use-element-non-rendered-has-selector.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>SVG Test: CSS selector matching non-rendered descendant with :has() in <use> element tree</title>
<link rel="match" href="use-element-selector-ref.html">
<style>
#rect:has(defs) { fill: green; }
</style>
<svg>
<use id="use_elm" xlink:href="#group" />
<defs>
<g id="group">
<rect id="rect" width="100" height="100">
<defs></defs>
</rect>
</g>
</defs>
</svg>