Support SVG path `d` attribute as a CSS Property
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
People
(Reporter: undetectable, Unassigned)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
Trying to change the path of an established SVG using CSS does not work. The SVG remains the same unlike on Chrome.
Actual results:
The SVG's path did not change, when a class was added to override the current path. Supposedly this was fixed in version 69, but it's not working in 70. There is an attached example. It works in the latest release of Chrome, but does not work on Firefox Nightly.
Expected results:
The SVG's path should've changed.
Comment 1•5 years ago
|
||
For the record, one is expected to click on the chevron in the demo. In Chrome it changes to point upward, in Firefox it does not.
Comment 2•5 years ago
|
||
The testcase relies on setting the 'd' property on a path inside of the SVG. Here's a reduced testcase.
We did add support for some geometry properties in bug 1383650, but I'm not sure if we added the "d" property or not. Violet, do you know if this is supposed to work yet?
Comment 3•5 years ago
|
||
No, we didn't. That being said we already have an SVG path parser in the style system. We should probably just switch all of them to use it, then implementing it should be straight forward.
https://searchfox.org/mozilla-central/source/servo/components/style/values/specified/svg_path.rs#33
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Just wonder if this bug is related to this: https://github.com/w3c/svgwg/pull/374?
Anyway, per comment 3, it's time to think about using the same parser for both SVG path string and CSS path function.
Comment 5•5 years ago
|
||
Any updates to this?
Updated•4 years ago
|
Comment 6•3 years ago
|
||
I think this should be fixed by Bug 1340422.
Description
•