Skip to content

fix(item): slotted ion-icon receives custom color - #17585

Merged
liamdebeasi merged 11 commits into
masterfrom
fix-slot-icon-color-md
Mar 1, 2019
Merged

liamdebeasi merged 11 commits into
masterfrom
fix-slot-icon-color-md

Conversation

@liamdebeasi

Copy link
Copy Markdown
Contributor

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

@ionitron-bot ionitron-bot Bot added the package: core @ionic/core package label Feb 22, 2019
liamdebeasi and others added 6 commits February 22, 2019 15:50
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

brandyscarney commented Feb 28, 2019 •

Copy link
Copy Markdown
Member

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. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants