Thanks for your reply Denis! Yes, I think for simple icons, your approach would be a better one. The reason why I tried this way was that I found for some icons that are more complex and mixing fill/stroke color (e.g. "#000", "rgba(0,0,0,0.5)" or "none"), that approach modified unwanted values. If you ever need to tackle these cases, this approach would work without problems and can be set verbose.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In our projects we replace stroke and fill values with
currentColor
. This way we can change icon color with just one line of css.Thanks for your reply Denis! Yes, I think for simple icons, your approach would be a better one. The reason why I tried this way was that I found for some icons that are more complex and mixing fill/stroke color (e.g. "#000", "rgba(0,0,0,0.5)" or "none"), that approach modified unwanted values. If you ever need to tackle these cases, this approach would work without problems and can be set verbose.