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

fix(icon): allow svg stroke to be passed in #643

Closed
wants to merge 2 commits into from
Closed

fix(icon): allow svg stroke to be passed in #643

wants to merge 2 commits into from

Conversation

btsiders
Copy link

@btsiders btsiders commented Dec 6, 2018

Related to ionic-team/ionic-framework#16483.

@brane53 asked that the stroke not be set at all, but I think setting it via a CSS var gives the most flexibility.

@ZachMoreno
Copy link

+1

@TomBourretViv
Copy link

Is there any news for this pull request ? I didn't find any solution to remove the default 'stroke' on my custom icons...

@patr0cl0
Copy link

patr0cl0 commented Apr 4, 2019

I haven't find a way to remove the magic stroke as well. Would be cool if someone could look around at this PR please.

@btsiders
Copy link
Author

btsiders commented Apr 4, 2019

I have no idea what happened to the code since the initial PR, but I have fixed it back up to not have any conflicts again.

@anagstef
Copy link

The way @btsiders implemented this does not introduce any breaking changes, but being able to turn stroke off is much needed. I think it should be merged.

@steebchen
Copy link

Can somebody please merge this? This is a must have for custom icons as it seems most of them are displayed incorrectly.

@anagstef
Copy link

anagstef commented May 6, 2019

@brandyscarney @liamdebeasi hey, i'm tagging you, cause maybe you have missed this Pull Request. It's a really important fix for custom icons. :)

@brandyscarney
Copy link
Member

brandyscarney commented May 14, 2019

Thanks so much for the PR! I fixed this a little different, in the PR here: #688

Basically I removed stroke entirely since it shouldn't be there even for ionicons, and moved the fill to the host element which allows developers to override them without any CSS variables:

ion-icon {
  stroke: blue;
  fill: red;
}

I've released a dev build for this in Ionic, see my comment here: ionic-team/ionic-framework#16483 (comment)

Please comment on that issue if you see any problems, thanks again!!

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

7 participants