Re: [svgwg] Style inheritance for <use> element referencing external SVG (#1030)

Thanks for the confirmation! 

One path that I can imagine _could_ lead to this outcome would be that the code treats `<use>`d external SVG as originating from the destination context, akin to having the referenced element inline:

```html
<!DOCTYPE html>
<html>
<head>
 <style type='text/css'>
  #symbol {
   fill: green;
  }
 </style>
</head>
<body>
 <svg viewBox="0 0 100 100">
  <defs>
   <symbol id='symbol'>
    <rect x='0' y='0' width='100' height='100'/>
   </symbol>
  </defs>
  <use href='#symbol'/>
 </svg>

</body>
</html>
```

…in which case CSS styles defined in the HTML _would_, I guess, match the element in the light DOM and those styles would be brought into the shadow DOM as well.

Unless there’s something in the SVG 2 spec prose that suggests this model for importing external SVG elements, I think this issue has been answered satisfactorily and points to a bug in the Firefox implementation.

-- 
GitHub Notification of comment by danburzo
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/1030#issuecomment-3526375174 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 13 November 2025 08:25:03 UTC