Bug 179724 - [SVG2] Styles not applied to targeted SVG elements when using `use`
Summary: [SVG2] Styles not applied to targeted SVG elements when using `use`
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 11
Hardware: Mac macOS 10.12
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 212902 (view as bug list)
Depends on:
Blocks: 191292
  Show dependency treegraph
 
Reported: 2017-11-15 04:35 PST by Peter Mouland
Modified: 2023-09-19 11:33 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Mouland 2017-11-15 04:35:11 PST
Aim:
To create an SVG containing multiple elements and to re-use this SVG via the <use> element. 
I would then like to style each element differently e.g. different stroke/fill colours.

Problem
Chrome, Edge, ie11 and Opera allow me to do this, which is exactly what I would like, unfortunately within Safari (and Firefox) no visible SVG is rendered.

Resolution
My preference would be to have Firefox/Safari behave how Edge (and the others) do,
Please could you confirm this behaviour is a bug?

Links:
CodePen Demo: https://codepen.io/peter-mouland/pen/pdEMWZ
firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1415186
Edge bug: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14673751/
Comment 1 Said Abou-Hallawa 2020-06-08 11:35:19 PDT
*** Bug 212902 has been marked as a duplicate of this bug. ***
Comment 2 Said Abou-Hallawa 2020-06-08 16:03:41 PDT
*** Bug 212902 has been marked as a duplicate of this bug. ***
Comment 3 Said Abou-Hallawa 2020-06-08 16:06:00 PDT
A reduced test case is: https://www.w3.org/TR/SVG2/images/struct/Use-changed-styles.svg.
Comment 4 Brent Fulgham 2022-07-15 16:24:27 PDT
WebKit and Chrome produce identical rendering. Firefox does not.