I updated to the 3.1 of the ui-svg version and have checked svg_graphics.html and svg_graphics.js in ~/.node-red/node_modules/node-red-contrib-ui-svg, and the code doesn't contain the !important tag
div.ui-svg path {
fill: inherit;
}
However, on loading a svg file I notice that my style="fill:red;" etc. tags are still overwritten by the default background. Inspecting the element shows me that the !important tag is still there
Just figured it out. Svg nodes retain their css tags from their time of creation, and so the new version doesn't overwrite this. The easiest way to change this seems to be to identify where all the tags are: find . -type f -exec grep "div.ui-svg" '{}' \; -print
And then modifying all of them with a batch command. For me this was in a flows.json file. Solved the issue.
Hi @letshin,
Thanks for sharing your solution!
Indeed the SVG node has set the css property once, but doesn't overwrite it afterwards (because the user might have changed it). And yes indeed the faulty css string keeps being used...
Bart