Skip to content

Commit

Permalink
chore(item): don't set ion-color properties
Browse files Browse the repository at this point in the history
references #14808
  • Loading branch information
camwiegert committed Sep 20, 2018
1 parent c7d4b02 commit a9af2f5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
12 changes: 8 additions & 4 deletions core/src/components/item/item.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
// --------------------------------------------------

:host {
--ion-color-base: var(--ion-item-background-color, transparent);
--ion-color-contrast: #{$item-ios-text-color};
--ion-color-tint: #{$item-ios-background-color-active};
--ion-color-shade: #{$item-ios-border-bottom-color};
--transition: background-color 200ms linear;
--padding-start: #{$item-ios-padding-start};
--inner-padding-end: #{$item-ios-padding-end / 2};
Expand All @@ -17,6 +13,14 @@
font-size: $item-ios-font-size;
}

:host(:not(.ion-color)) {
--background: var(--ion-item-background-color, transparent);
--background-activated: #{$item-ios-background-color-active};
--border-color: #{$item-ios-border-bottom-color};
--color: #{$item-ios-text-color};
--detail-push-color: #{$item-ios-border-bottom-color};
}

:host(.activated) {
--transition: none;
}
Expand Down
13 changes: 9 additions & 4 deletions core/src/components/item/item.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
// --------------------------------------------------

:host {
--ion-color-base: var(--ion-item-background-color, transparent);
--ion-color-contrast: #{$item-md-text-color};
--ion-color-tint: #{$item-md-background-color-active};
--ion-color-shade: #{$item-md-border-bottom-color};
--transition: background-color 300ms cubic-bezier(.4, 0, .2, 1);
--padding-start: #{$item-md-padding-start};
--inner-padding-end: #{$item-md-padding-end / 2};
Expand All @@ -21,6 +17,15 @@
text-transform: none;
}

:host(:not(.ion-color)) {
--background: var(--ion-item-background-color, transparent);
--background-activated: #{$item-md-background-color-active};
--border-color: #{$item-md-border-bottom-color};
--color: #{$item-md-text-color};
--detail-push-color: #{$item-md-border-bottom-color};
}


// Material Design Item Lines
// --------------------------------------------------

Expand Down
10 changes: 5 additions & 5 deletions core/src/components/item/item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:host {
--min-height: #{$item-min-height};
--background: #{current-color(base)};
--background-active: #{current-color(tint)};
--background-activated: #{current-color(tint)};
--color: #{current-color(contrast)};
--detail-push-color: #{current-color(shade)};
--border-radius: 0;
Expand All @@ -33,7 +33,7 @@

display: block;

color: #{current-color(contrast)};
color: var(--color);

font-family: $font-family-base;

Expand All @@ -43,8 +43,8 @@
box-sizing: border-box;
}

:host(.activated) {
--background: var(--background-active);
:host(.activated) .item-native {
background: var(--background-activated);
}

:host(.item-disabled) {
Expand Down Expand Up @@ -77,7 +77,7 @@

outline: none;

background-color: var(--background);
background: var(--background);

box-shadow: var(--box-shadow);
overflow: hidden;
Expand Down

0 comments on commit a9af2f5

Please sign in to comment.