Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use currentColor for fill #7

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Conversation

StefanH-AT
Copy link
Contributor

Hi, I'm using this library with nuxt-lucide-icons which adds stroke="currentColor" to the svg. This way, icons can be recolored in css by setting the color property of the svg. Right now the only way to change the color of an icon is in the markup, so I think setting fill="currentColor" would be really useful to allow this to be changed in CSS as well as generally following the current text color as a reasonable fallback

@wyatt-herkamp
Copy link
Owner

Can you add a prop to disable it? I don't see much use case in disabling it. But someone might need to.

@StefanH-AT
Copy link
Contributor Author

You can add fill="black" or something to return to the previous behaviour. Don't think a dedicated property like disable-currentcolor-fill would make sense

@wyatt-herkamp
Copy link
Owner

Ok cool!. Looks good. I didn't realize props would override like that.

This should be released at the end of the week.

@wyatt-herkamp wyatt-herkamp merged commit cfb7d77 into wyatt-herkamp:main Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants