-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(#784): use currentColor for fill and stroke properties #805
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
fix(#784): use currentColor for fill and stroke properties #805
Conversation
Please make it happens. The library is just not usable without modifying the hardstuck black color |
This would be awesome. It's the only reason why I can't use ionicons. |
@adamdbradley it seems a bunch of us are stuck on this issue (understandable, since changing icon color is pretty common). Any chance you would be able to let us know if you think it'll be merged, or if there's some problem with the suggested approach? |
Can someone merge this? 🙏 It's unbelievable to have inline stroke color from icon creators with 7+ years experience. Even on official website icons don't have hardcoded color. |
I discussed my PR a while ago and I think it can't be merged so easily as most of the icons are generated and used across different pipelines, what I did understand and remember. That's probably why it takes more time than as it looks. |
Any update on this, you guys? No conflicts and this problem that makes this library unusable for many... |
To everyone having this issue: Using
Using these scripts allows you to set the color of outlined icons. Just replace
|
This issue with this PR is the following: updating the source icons is kind of a conflicts with the actual build pipeline. It works currently as following: Icons in source folder can contain style, such as To overcome the issue and clean the icons, there is a build script which optimize ("clean") the svg before saving them in the That's why there is no issue if the icons are consumed from a bundle ("from npm") but only if downloaded. Cleaning the source icons or creating a script to do so is nice, but won't ensure in the future that there will be one new icons which will contain a style. Therefore, I am thinking that moreover than a script and updating all current icons, maybe it would actually need a GitHub action/robot which check any PR for such style or process icons and clean them in PR. But, spontaneously, maybe the easier option is to close this PR and "just" to enhance the ionicons website so that icons downloaded from the website do not contains these style, basically enhancing the existing encodeSvg. The download can either happens from GitHub or from the ionicons website but doing so, at least from the most important channel (my guess), the icons' style would be delivered cleaned. What do you think about it? |
Closed in 98fa89e |
Yeaaaaaaah awesome! Thx @adamdbradley 🙏 |
most icons have a
stroke:#000;
color fixed to black and two have afill:#010101;
color fixed to grey.this PR replace these fixed colors with
currentColor
in order to inherit the parent color.