Skip to content
Permalink
Browse files

fix(item): slotted ion-icon receives custom color (#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
  • Loading branch information...
liamdebeasi committed Mar 1, 2019
1 parent 5a197ca commit 14dd871a8514ab5b002e6e024263521c714dfb37
@@ -43,12 +43,15 @@
// --------------------------------------------------

::slotted(ion-icon) {

color: $item-md-icon-slot-color;

font-size: $item-md-icon-slot-font-size;
}

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

::slotted(ion-icon[slot]) {
@include margin($item-md-icon-slot-margin-top, $item-md-icon-slot-margin-end, $item-md-icon-slot-margin-bottom, $item-md-icon-slot-margin-start);
}
@@ -29,6 +29,13 @@
</ion-item-divider>

<ion-list>
<ion-item-divider>
<ion-label>
Divider with a slotted icon
</ion-label>
<ion-icon name="trash" slot="start"></ion-icon>
</ion-item-divider>

<ion-item-divider>
<ion-label>
Divider in List
@@ -104,6 +104,10 @@
font-size: $item-md-icon-slot-font-size;
}

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

::slotted(ion-icon[slot]) {
@include margin($item-md-icon-slot-margin-top, $item-md-icon-slot-margin-end, $item-md-icon-slot-margin-bottom, $item-md-icon-slot-margin-start);
}
@@ -21,6 +21,14 @@
</ion-header>

<ion-content id="content">

<ion-item color="primary" lines="none">
<ion-label>
ion-item w/ color
</ion-label>
<ion-icon name="trash" slot="start"></ion-icon>
</ion-item>

<ion-item detail>
<ion-label>
ion-item [detail] attr

0 comments on commit 14dd871

Please sign in to comment.
You can’t perform that action at this time.