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(item): slotted ion-icon receives custom color #17585

Merged
merged 11 commits into from Mar 1, 2019

Conversation

Projects
None yet
2 participants
@liamdebeasi
Copy link
Member

commented Feb 22, 2019

Short description of what this resolves:

Fixes a bug where a slotted ion-icon in ion-item was not receiving the color contrast value in MD mode

Changes proposed in this pull request:

  • Remove manually setting color for slotted icon in MD

Ionic Version:

Fixes: #17557

liamdebeasi added some commits Feb 22, 2019

aevert "fix same issue in item divider"
a
ahis reverts commit c3748a8.
a
a Please enter the commit message for your changes. Lines starting
a with '#' will be ignored, and an empty message aborts the commit.
a
a On branch fix-slot-icon-color-md
a Changes to be committed:
a	modified:   core/src/components/item-divider/item-divider.md.scss
a
@brandyscarney

This comment has been minimized.

Copy link
Member

commented Feb 28, 2019

Instead of using :not could we just update the icon color? something like:

:host(.ion-color) ::slotted(ion-icon) {
  color: current-color(contrast);
}

My concern is that the current rule is so specific that someone won't be able to override a slotted ion-icon color by styling it directly. I didn't test this theory though. 🙂

liamdebeasi and others added some commits Mar 1, 2019

liamdebeasi added some commits Mar 1, 2019

@liamdebeasi liamdebeasi merged commit 14dd871 into master Mar 1, 2019

2 checks passed

build Workflow: build
Details
screenshot Screenshot
Details

KillerCodeMonkey added a commit to KillerCodeMonkey/ionic that referenced this pull request Mar 1, 2019

fix(item): slotted ion-icon receives custom color (ionic-team#17585)
* fix slotted icon color md

* fix same issue in item divider

* aevert "fix same issue in item divider"
a
ahis reverts commit c3748a8.
a
a Please enter the commit message for your changes. Lines starting
a with '#' will be ignored, and an empty message aborts the commit.
a
a On branch fix-slot-icon-color-md
a Changes to be committed:
a	modified:   core/src/components/item-divider/item-divider.md.scss
a

* Revert "fix slotted icon color md"

This reverts commit e80abea.

* fix case where no color

* chore(): update selector to make it easier to override

@liamdebeasi liamdebeasi deleted the fix-slot-icon-color-md branch Mar 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.