I have an SVG image in my code, there are 3 paths in it with IDs #top, #left, #right. I want to swap their colors on hover event over the image container (#block).
<svg>
#top /* color 1*/
#left #right /* color 2*/
</svg>
Currently I have 3 CSS styles to achieve this:
#block:hover #top
{ fill: color2; }
#block:hover #left
{ fill: color1; }
#block:hover #right
{ fill: color1; }
Is it possible to combine last two to styles into one like:
#block:hover #left, #right
{ fill: color1; }
Or even better, all into one ?
#block:hover
{
@ #left { fill: color1; }
@ #right{ fill: color1; }
....
}
Thank you !