Skip to content

Commit

Permalink
fix(segment): apply hover properly for segment with color (#18549)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed Jun 21, 2019
1 parent 832306c commit 78e477b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion core/src/components/segment/segment.ios.scss
Expand Up @@ -27,7 +27,6 @@

:host(.ion-color)::slotted(ion-segment-button) {
--border-color: #{current-color(base)};
--background-hover: #{current-color(base, .04)};

background: transparent;
color: #{current-color(base)};
Expand All @@ -52,6 +51,12 @@
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
// --------------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion core/src/components/segment/segment.md.scss
Expand Up @@ -23,7 +23,6 @@
// --------------------------------------------------

:host(.ion-color)::slotted(ion-segment-button) {
--background-hover: #{current-color(base, .04)};
--background-activated: #{current-color(base, .16)};
--ripple-color: #{current-color(base)};

Expand All @@ -40,6 +39,11 @@
color: #{current-color(base)};
}

@media (any-hover: hover) {
:host(.ion-color)::slotted(ion-segment-button:hover) {
background: #{current-color(base, .04)};
}
}

// Segment: Default Toolbar
// --------------------------------------------------
Expand Down

0 comments on commit 78e477b

Please sign in to comment.