natemoo-re / astro-icon

Inline and sprite-based SVGs in Astro made easy!
https://astroicon.dev
Other
987 stars 57 forks source link

Cannot change color of icon using styling #216

Open jamesmcl113 opened 3 months ago

jamesmcl113 commented 3 months ago

What version of astro-icon are you using?

v1.1.0

Astro Info

Astro                    v4.5.5
Node                     v21.7.1
System                   macOS (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             astro-icon

If this issue only occurs in one browser, which browser is a problem?

Firefox

Describe the Bug

I'm using the standard styling instructions but the color of the svg is not changing. I can see that the style is being applied using the inspector.

What's the expected result?

The icon should change color.

Link to Minimal Reproducible Example

https://github.com/natemoo-re/astro-icon?tab=readme-ov-file#styling

lindakatcodes commented 2 months ago

Are you using fill or color in the CSS? I noticed after upgrade to a v1 version I had to switch to use color instead, and it seems to be working for me. Just in case it helps!

bweis commented 1 week ago

See #226 for details as to why this is.