fix(button): buttons using fill and color properties now account for hover and focused opacity variables (#23442)

resolves #23441
This commit is contained in:
Liam DeBeasi
2021-06-21 13:00:50 -04:00
committed by GitHub
parent 87b4a42c96
commit 68c0e7136d
3 changed files with 44 additions and 8 deletions

View File

@ -129,30 +129,29 @@
// Material Design Button: Hover
// --------------------------------------------------
/**
* Only allow overriding of opacity here
* as developers should not be overriding
* colors when using the color prop.
*/
:host(.button-solid.ion-color.ion-focused) .button-native::after {
background: #{current-color(contrast)};
opacity: .24;
}
:host(.button-clear.ion-color.ion-focused) .button-native::after,
:host(.button-outline.ion-color.ion-focused) .button-native::after {
background: #{current-color(base)};
opacity: .12;
}
@media (any-hover: hover) {
:host(.button-solid.ion-color:hover) .button-native::after {
background: #{current-color(contrast)};
opacity: .08;
}
:host(.button-clear.ion-color:hover) .button-native::after,
:host(.button-outline.ion-color:hover) .button-native::after {
background: #{current-color(base)};
opacity: .04;
}
}