fix(buttons): use proper button colors based on CSS variables when inside of a toolbar (#20633)

This commit is contained in:
Brandy Carney
2020-02-27 16:22:39 -05:00
committed by GitHub
parent 0e0e401d86
commit c1d7bf229d
11 changed files with 360 additions and 59 deletions

View File

@ -158,6 +158,6 @@ ion-icon {
// Menu Button in Toolbar: Global Theming
// --------------------------------------------------
:host(.in-toolbar) {
:host(.in-toolbar:not(.in-toolbar-color)) {
color: #{var(--ion-toolbar-color, var(--color))};
}
}

View File

@ -86,6 +86,7 @@ export class MenuButton implements ComponentInterface, ButtonInterface {
'menu-button-hidden': hidden,
'menu-button-disabled': disabled,
'in-toolbar': hostContext('ion-toolbar', this.el),
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
'ion-activatable': true,
'ion-focusable': true
}}