Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css border artifacts from inline svgs

Tags:

css

reactjs

svg

I am working with a react app in chrome that involves a lot of inline svgs.

The text will have black borders randomly around it if its near an inline svg. It will sometimes disappear or appear as I highlight text.

The only thing that's consistent is there is an inline svg on every page where the border appears.

The black borders around the text between the images

Adding

{ 
    backface-visibility: hidden;
}

On a element with the border fixes it, but its not feasible to add it everywhere.

like image 628
Neablis Avatar asked Jul 15 '26 10:07

Neablis


1 Answers

You could also try -webkit-transform: translate3d(0,0,0); - that also seems to help in this kind of situation, along with backface-visibility: hidden;.

like image 182
rpivovar Avatar answered Jul 18 '26 04:07

rpivovar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!