I have embedded 2 different SVGs using an embed element and I want to make them different colours, however when I change the colour for one it does not take effect until I change the colour for the other to the same colour, leaving them both the same colour. Am I missing something in the code here that is forcing them both to be in the same class or something like that?
They are exported for screen from Adobe Illustrator layers to SVG files, opened in simple text and code copied into embed element.
Simply I want one of them to be white and the other to be another colour.
You have to change the class of the embedded svg, i.e. give the second svg a class .cls-2 in the style definition and the path class=“cls-2”. That will work
What @rich_art said. Both currently have the same class and you need to change the class of the one you want to have a different style.
Here is a first SVG which I changed the stroke property to #fff for white. In the second SVG you would change the underlined parameters to whatever you want to be different.
Thanks a lot for your help! I suspected something like this but I am not very familiar with code, it seems that Adobe Illustrator outputs SVGs from different files with the same class ID by default, so just needs to be changed manually.