Skip to content

fix(icon): set fill on host element and remove stroke - #688

Merged
brandyscarney merged 5 commits into
masterfrom
fix-custom-icon-stroke
May 10, 2019
Merged

brandyscarney merged 5 commits into
masterfrom
fix-custom-icon-stroke

Conversation

@brandyscarney

@brandyscarney brandyscarney commented May 9, 2019 •

Copy link
Copy Markdown
Member

This moves the fill property to the host element and removes the stroke since
A) I couldn't find any of our icons that even use stroke
B) I don't see any of the custom icons needing stroke a specific color by default
C) It allows the user to change these properties if desired on the <ion-icon> itself without needing CSS variables
D) It still inherits the color that gets set

This also updates the test to include custom icons.

This would fix ionic-team/ionic-framework#16483, but I need to do some testing in Ionic for it.

Below is a comparison between master and this branch, where the "Custom CSS" group is specifically setting the following:

ion-icon {
  stroke: red;
  fill: blue;
}
master branch
localhost_3333_(iPhone 6_7_8) (2) localhost_3333_(iPhone 6_7_8)

@brandyscarney

Copy link
Copy Markdown
Member Author

Got the ok on this from @bensperry 🆗

@brandyscarney
brandyscarney merged commit 2542b5a into master May 10, 2019
@brandyscarney
brandyscarney deleted the fix-custom-icon-stroke branch May 10, 2019 15:20
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.

Custom icons have a small stroke applied to them

2 participants