mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
fix(buttons): use theme/color toolbar colors for buttons (#18191)
- Updates the iOS buttons in a toolbar to use the proper global theming variables - Updates the iOS segment to use the correct background variable when checked - Updates the iOS back button and menu button to use the proper color in a toolbar - Updates the iOS buttons in a toolbar w/ color to use the proper contrast colors (background, borders, text, hover, focus), mostly solid and outline buttons were affected - Updates the CSS that applies the global toolbar variables so that it won't affect toolbars w/ a color fixes #18184, fixes #17840
This commit is contained in:
@ -64,14 +64,16 @@
|
||||
line-height: $segment-button-ios-toolbar-line-height;
|
||||
}
|
||||
|
||||
:host-context(ion-toolbar):not(.ion-color)::slotted(ion-segment-button) {
|
||||
:host-context(ion-toolbar:not(.ion-color)):not(.ion-color)::slotted(ion-segment-button) {
|
||||
border-color: #{var(--ion-toolbar-color-checked, var(--border-color))};
|
||||
|
||||
color: #{var(--ion-toolbar-color-unchecked, var(--color))};
|
||||
}
|
||||
|
||||
:host-context(ion-toolbar):not(.ion-color)::slotted(.segment-button-checked) {
|
||||
color: #{var(--ion-toolbar-color-checked, var(--color-checked))};
|
||||
:host-context(ion-toolbar:not(.ion-color)):not(.ion-color)::slotted(.segment-button-checked) {
|
||||
background: #{var(--ion-toolbar-color-checked, var(--background-checked))};
|
||||
|
||||
color: #{var(--ion-toolbar-background, var(--color-checked))};
|
||||
}
|
||||
|
||||
// Segment: Color Toolbar
|
||||
|
@ -44,11 +44,11 @@
|
||||
// Segment: Default Toolbar
|
||||
// --------------------------------------------------
|
||||
|
||||
:host-context(ion-toolbar):not(.ion-color)::slotted(ion-segment-button) {
|
||||
:host-context(ion-toolbar:not(.ion-color)):not(.ion-color)::slotted(ion-segment-button) {
|
||||
color: #{var(--ion-toolbar-color-unchecked, var(--color))};
|
||||
}
|
||||
|
||||
:host-context(ion-toolbar):not(.ion-color)::slotted(.segment-button-checked) {
|
||||
:host-context(ion-toolbar:not(.ion-color)):not(.ion-color)::slotted(.segment-button-checked) {
|
||||
--indicator-color-checked: #{var(--ion-toolbar-color-checked, var(--color-checked))};
|
||||
|
||||
color: #{var(--ion-toolbar-color-checked, var(--color-checked))};
|
||||
|
Reference in New Issue
Block a user