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

Color of svg changed. #45

Open
hellomrbigshot opened this issue Feb 8, 2022 · 7 comments
Open

Color of svg changed. #45

hellomrbigshot opened this issue Feb 8, 2022 · 7 comments

Comments

@hellomrbigshot
Copy link

I have a svg file called menu-more.svg

<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="50" height="50" fill="#353A58"/>
<path d="M17 18H33" stroke="#F2F4FA" stroke-width="2" stroke-linecap="round"/>
<path d="M17 25H33" stroke="#F2F4FA" stroke-width="2" stroke-linecap="round"/>
<path d="M17 32H33" stroke="#F2F4FA" stroke-width="2" stroke-linecap="round"/>
</svg>

It used to be like this
menu-more-light

But when i import this with the plugin, it shows like this
menu-more-dark

Color of path changed. How it happens.

@baiye0
Copy link

baiye0 commented Feb 9, 2022

Lastest version stroke is replaced.
image
The new version is not compatible.

@ZuulAndRibbon
Copy link

Lastest version stroke is replaced. image The new version is not compatible.

I have the same problem.How to change the color

@michaelhue
Copy link

While this behavior should probably be opt-in, it's actually quite useful (at least for all my use cases).
The currentColor keyword represents the element's color CSS property.

In other words: in order to change the icon color, change the color property of the icon element or any parent element.

@peterdzl
Copy link

I agree this should be an opt-in - at present there is no way to leave the SVG stroke colour untouched. Our use case is that we have multiple colours and we define currentColor in the source SVG where we want to make use of CSS overrides.

@digitalacorn
Copy link

I added a pull request to make this behaviour optional

#68

@nelsonjd
Copy link

nelsonjd commented Aug 9, 2022

Thank you @digitalacorn. I would like to opt-in to this stroke replacing as well. Can we get this merged soon? @anncwb

@inhyuck
Copy link

inhyuck commented Jan 30, 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

No branches or pull requests

8 participants