Recoloring symbolic icons needs extra classes for strokes, not fills
In this issue we were diagnosing why some symbolic icons get recolored incorrectly.
The cause of the bug is this. The CSS that GTK uses to wrap symbolic icons has this:
<style type="text/css">
rect,path,ellipse,circle,polygon {
fill: gray !important;
}
.warning {
fill: pink !important;
}
.error {
fill: red !important;
}
.success {
fill: green !important;
}
</style>
However, the SVG element that gets misrendered is an open path with fill:none; stroke:something-else;
:
<path style="fill:none;stroke-width:2;stroke:gray;" d="... an open path ..."/>
When this open path gets restyled with fill:gray;
as per the CSS, it gets a solid fill, as if it were an open path. (This is the behavior in Firefox and Inkscape too, so it's not a librsvg bug).
Since it's easier for artists to be able to use both strokes and fills for symbolic icons, I think GTK should use an extra set of CSS classes for strokes:
.normal-fill { fill: gray !important; } /* or whatever the color is */
.normal-stroke { stroke: gray !important; }
.error-fill { fill: red !important; }
.error-stroke { stroke: red !important; }
/* etc. for .success-fill, .success-stroke and the rest */