I'm working on a handful of SVG icons as <symbol> that I want to be able to alter on :hover, :focus, and :active. Specifically, I need to be able to change the color of specific paths within an SVG. Normally, with any other element, I can do something like this
.parent .child {
fill: blue;
}
.parent:hover .child {
fill: red;
}
However, when applying this to my SVG symbols, it just doesn't work. Not many discussions from what I can find in the last couple of years on problems changing css with shadow-DOM stuff like SVG symbols, but the just using CurrentColor won't work for me because I need to do it with two colors.
I have a CodePen up with my scenario here
It seems like this should be straightforward but I've been tied up in knots over it for awhile. Anybody have any thoughts that might help?
Thanks in advance!