fantasticon icon indicating copy to clipboard operation
fantasticon copied to clipboard

Material SVGs render as dark grey squares

Open dost-mmg opened this issue 11 months ago • 1 comments

When downloading Material SVG icons from Google, they are rendered as dark grey squares. I've tried uploading/downloading them from other editors and the issue is not resolved. I've included the Google icon stylesheet, but that has not worked. Screenshot 2024-03-07 at 6 54 22 AM

dost-mmg avatar Mar 07 '24 13:03 dost-mmg

I've not seen the squares, but I have seem Google's Material icons fail to render at all. This seems to happen because those icons come with the height and width hardcoded to 24x24. Open the SVG with a text editor and remove the height/width. Change from this:

<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24">

to this:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">

oxguy3 avatar Apr 14 '24 01:04 oxguy3