Skip to content

Commit

Permalink
fix(button): disable :hover on non supported devices (#15705)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmiguelbesada authored and manucorporat committed Sep 24, 2018
1 parent f68c457 commit 67eb661
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
14 changes: 8 additions & 6 deletions core/src/components/button/button.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@

// iOS Solid Button
// --------------------------------------------------

:host(.button-solid:hover) {
--opacity: #{$button-ios-opacity-hover};
@media (any-hover: hover) {
:host(.button-solid:hover) {
--opacity: #{$button-ios-opacity-hover};
}
}

:host(.button-solid.activated) {
Expand All @@ -55,9 +56,10 @@

// iOS Clear Button
// --------------------------------------------------

:host(.button-clear:hover) {
--opacity: #{$button-ios-clear-opacity-hover};
@media (any-hover: hover) {
:host(.button-clear:hover) {
--opacity: #{$button-ios-clear-opacity-hover};
}
}

:host(.button-clear.activated) {
Expand Down
6 changes: 4 additions & 2 deletions core/src/components/buttons/buttons.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
// iOS Toolbar Button Solid
// --------------------------------------------------

::slotted(*) .button-solid-ios:hover {
opacity: .4;
@media (any-hover: hover) {
::slotted(*) .button-solid-ios:hover {
opacity: .4;
}
}


Expand Down
6 changes: 4 additions & 2 deletions core/src/components/searchbar/searchbar.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@
color: #{current-color(base)};
}

:host(.ion-color) .searchbar-cancel-button:hover {
color: #{current-color(tint)};
@media (any-hover: hover) {
:host(.ion-color) .searchbar-cancel-button:hover {
color: #{current-color(tint)};
}
}

// Searchbar in Toolbar Color
Expand Down
9 changes: 7 additions & 2 deletions core/src/components/tabbar/tab-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@
background: var(--background-focused);
}

.tab-btn:hover,
@media (any-hover: hover) {
.tab-btn:hover {
color: var(--color-selected);
}
}

.tab-btn-selected {
color: var(--color-selected);
}
Expand Down Expand Up @@ -125,4 +130,4 @@

.tab-btn-selected .tab-btn-icon {
transform: var(--icon-transform-selected);
}
}

0 comments on commit 67eb661

Please sign in to comment.