Bug 179724

Summary: [SVG2] Styles not applied to targeted SVG elements when using `use`
Product: WebKit Reporter: Peter Mouland <peter.mouland>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, bfulgham, emilio, gwynne, ian, sabouhallawa, zalan, zimmermann
Priority: P2 Keywords: BrowserCompat
Version: Safari 11   
Hardware: Mac   
OS: macOS 10.12   
Bug Depends on:    
Bug Blocks: 191292    

Peter Mouland
Reported 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/
Attachments
Said Abou-Hallawa
Comment 1 2020-06-08 11:35:19 PDT
*** Bug 212902 has been marked as a duplicate of this bug. ***
Said Abou-Hallawa
Comment 2 2020-06-08 16:03:41 PDT
*** Bug 212902 has been marked as a duplicate of this bug. ***
Said Abou-Hallawa
Comment 3 2020-06-08 16:06:00 PDT
Brent Fulgham
Comment 4 2022-07-15 16:24:27 PDT
WebKit and Chrome produce identical rendering. Firefox does not.
Ahmad Saleem
Comment 5 2025-12-17 19:23:10 PST
Chrome Canary 145 and Firefox Nightly 148 are now matching but Safari 26.3 is outlier.
Note You need to log in before you can comment on or make changes to this bug.