gitFoxCode / nuxt-icons

Module for Nuxt allowing pleasant use of svg icons
187 stars 23 forks source link

Any way to disable the standard css? #46

Closed bartddop closed 11 months ago

bartddop commented 11 months ago

Would is be smart to have a setting where you can turn off the standard css ? I know you can overwrite css. But with the fill currentColor it gives me problems with more complex svg's like a logo or one with multiple colors.

.nuxt-icon {
  width: 1em;
  height: 1em;
  margin-bottom: 0.125em;
  vertical-align: middle;
}
.nuxt-icon--fill,
.nuxt-icon--fill * {
  fill: currentColor;
}

Thanks for building this package!

gitFoxCode commented 11 months ago

Disabling CSS (currentColor) will make SVG icons no longer able to be "colored from text" which would make the module lose its biggest advantage

bartddop commented 11 months ago

Oke all good! Than it's not a suitable package for svg's with multiple colors.

gitFoxCode commented 11 months ago

@bartddop You can use SVG with multiple colors by using the "filled" attribute: <nuxt-icon name="test" filled/>