NO BUG: SVG color fill bug

Bricks Version: 1.5.7
Browser: Chrome 90
OS: windows

Hi,
I have this weird svg fill bug that I cannot solve. I tried using the code widget/svg widget/ icon widget but that didn’t solve my problem.

So when I use a color to fill an svg all the other svgs adopt that color. And when I remove the fill color they keep that color no matter what I do.
Some svg still work, but most of them keep that color. I can only resolve it by uploading some different svg.

and it is suppose to look like this

Kind regards

Hey,
Thank you for your report.

Please open your SVGs in a text editor and look at the inline style rules. Probably they all use the same rules and IDs and overwrite each other.

Please take a look at my explanation here:

Best regards,
timmse

1 Like

Hello,
thank you very much that solved my problem! Most of my svg’s had the same classes, I switched the classes and now it works.

Have a nice day!
Kind regards

I’m having a similar problem with SVGs exported from Affinity Photo. I’ve opened up the file in a text editor but I can’t see any classes there. This is the only inline style:

style=“fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;”

Removing it didn’t make any difference

They have unique ids and there’s no reference to classes

I’ve given them different classes in Bricks and when I look in the chrome inspector it thinks the stroke and fill is applying but it’s not. There’s no reference to any other styles overriding it

This is the page - I want the icons in the footer to have a white fill:

https://test.vikmartin.co.uk/

Hope someone can help

Vik

Hi Vik,
Your SVG contains an embedded image, so you can’t change the stroke or fill. Instead of Affinity Photo, you should use Affinity Designer to export the SVG, so it becomes a “real” SVG.

Usually, you can scale (e.g. browser zoom) an SVG infinitely without any quality loss, but because of the embedded image, that’s not the case (see how pixelated it is):

Ah, ok that makes sense. Thanks