Closed
Bug 1415186
Opened 8 years ago
Closed 8 years ago
Styles not applied to targeted SVG elements when using `use`
Categories
(Core :: SVG, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: peter.mouland, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: webcompat:platform-bug)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Steps to reproduce:
I setup a SVG, one using `symbol`, the other using `use`.
When attempting to apply styles to the elements within use (which exist via showDom i think because of the symbol), nothing happens
CodePen Demo:
Under the heading `SVGs w/ multiple styles`:
https://codepen.io/peter-mouland/pen/JErvZY
Actual results:
no styles were applied - but this works in other popular browsers (not safari)
Expected results:
I expected (hoped is more like it) that that styles were applied as they were in Chrome and Edge etc
Updated•8 years ago
|
Component: Untriaged → SVG
Product: Firefox → Core
Comment 1•8 years ago
•
|
||
This is invalid per https://www.w3.org/TR/SVG2/struct.html#UseElement
> However, if a CSS rule uses a complex selector to match an element based on its ancestors or siblings, and those ancestors or siblings are not cloned as part of the shadow tree, then that rule would no longer match the element instance.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 2•8 years ago
|
||
I have simplified the code pen to demonstrate only this issue.
https://codepen.io/peter-mouland/pen/pdEMWZ/
Apologies, but I don't completely get the link you sent. Are you saying that the selector `.blue--line-1 .line--1` is complex and therefore does not have to be applied?
As you can see the using the SVGs in this way works in other browsers (Chrome, ie11, edge, opera) but not within Firefox (or Safari). Would this be enough to persuade the mozilla community to try and fix/add this feature? I think it would be an asset if this was to work in all browsers.
Reporter | ||
Updated•8 years ago
|
Status: RESOLVED → UNCONFIRMED
OS: Unspecified → Mac OS X
Resolution: INVALID → ---
Reporter | ||
Comment 3•8 years ago
|
||
Sorry - I've moved this back to `unconfirmed` while I wait to see if the additional, more specific, details added prove to be useful in confirming if this really is a bug.
the Firefox version I tests this in is v56
Updated•8 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → INVALID
Updated•8 years ago
|
Status: RESOLVED → VERIFIED
Comment 4•8 years ago
|
||
Firefox is the only browser thus far to have implemented SVG 2 use elements. Other browsers implement them in the SVG 1.1 way. I imagine they will catch up at some point.
Updated•11 months ago
|
Keywords: webcompat:platform-bug
You need to log in
before you can comment on or make changes to this bug.
Description
•