fix(segment): apply hover properly for segment with color (#18549)

This commit is contained in:
Brandy Carney
2019-06-21 16:17:09 -04:00
committed by GitHub
parent 832306cf6e
commit 78e477b2a7
2 changed files with 11 additions and 2 deletions

View File

@ -27,7 +27,6 @@
:host(.ion-color)::slotted(ion-segment-button) { :host(.ion-color)::slotted(ion-segment-button) {
--border-color: #{current-color(base)}; --border-color: #{current-color(base)};
--background-hover: #{current-color(base, .04)};
background: transparent; background: transparent;
color: #{current-color(base)}; color: #{current-color(base)};
@ -52,6 +51,12 @@
color: #{current-color(contrast, $segment-ios-opacity-disabled)}; color: #{current-color(contrast, $segment-ios-opacity-disabled)};
} }
@media (any-hover: hover) {
:host(.ion-color)::slotted(ion-segment-button:hover:not(.segment-button-checked)) {
background: #{current-color(base, .1)};
}
}
// Segment: Default Toolbar // Segment: Default Toolbar
// -------------------------------------------------- // --------------------------------------------------

View File

@ -23,7 +23,6 @@
// -------------------------------------------------- // --------------------------------------------------
:host(.ion-color)::slotted(ion-segment-button) { :host(.ion-color)::slotted(ion-segment-button) {
--background-hover: #{current-color(base, .04)};
--background-activated: #{current-color(base, .16)}; --background-activated: #{current-color(base, .16)};
--ripple-color: #{current-color(base)}; --ripple-color: #{current-color(base)};
@ -40,6 +39,11 @@
color: #{current-color(base)}; color: #{current-color(base)};
} }
@media (any-hover: hover) {
:host(.ion-color)::slotted(ion-segment-button:hover) {
background: #{current-color(base, .04)};
}
}
// Segment: Default Toolbar // Segment: Default Toolbar
// -------------------------------------------------- // --------------------------------------------------