Skip to content

Commit 75da67f

Browse files
committed
fix(toolbar): use correct colors on activated buttons
1 parent 5732df1 commit 75da67f

File tree

13 files changed

+21
-11
lines changed

13 files changed

+21
-11
lines changed

core/src/components/button/button.ios.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,5 +291,5 @@
291291

292292
:host(.button-outline.ion-activated.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native {
293293
background: var(--ion-toolbar-color, var(--color));
294-
color: #{var(--ion-components-ion-toolbar-bg, var(--background), ion-color(primary, contrast))};
294+
color: var(--ion-components-ion-toolbar-activated-button-color);
295295
}

core/src/components/button/button.ios.vars.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,5 @@ $button-ios-clear-opacity-hover: 0.6;
118118

119119
/// @prop - Font weight of the strong button
120120
$button-ios-strong-font-weight: 600;
121+
122+
$test: $item-ios-background;

core/src/components/button/button.md.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,6 @@
240240
// --------------------------------------------------
241241

242242
:host(.button-outline.ion-activated.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native {
243-
background: var(--ion-components-ion-toolbar-bg, var(--color));
243+
background: var(--ion-components-ion-toolbar-activated-bg);
244244
color: #{var(--ion-toolbar-color, var(--background), ion-color(primary, contrast))};
245245
}

core/src/components/buttons/buttons.md.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
// --------------------------------------------------
7979

8080
::slotted(*) .button-solid {
81-
--color: var(--ion-components-ion-toolbar-bg);
81+
--color: #{$toolbar-md-background};
8282
--background: #{$toolbar-md-color};
8383
--background-activated: transparent;
8484
--background-focused: currentColor;

core/src/components/toolbar/toolbar.ios.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
// --------------------------------------------------
66

77
:host {
8-
--background: var(--ion-components-ion-toolbar-bg);
8+
--background: #{$toolbar-ios-background};
99
--color: #{$toolbar-ios-color};
10-
--border-color: var(--ion-components-ion-toolbar-border-color);
10+
--border-color: #{$toolbar-ios-border-color};
1111
--padding-top: #{$toolbar-ios-padding-top};
1212
--padding-bottom: #{$toolbar-ios-padding-bottom};
1313
--padding-start: #{$toolbar-ios-padding-start};

core/src/components/toolbar/toolbar.md.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
// --------------------------------------------------
66

77
:host {
8-
--background: var(--ion-components-ion-toolbar-bg);
8+
--background: #{$toolbar-md-background};
99
--color: #{$toolbar-md-color};
10-
--border-color: var(--ion-components-ion-toolbar-border-color);
10+
--border-color: #{$toolbar-md-border-color};
1111
--padding-top: 0;
1212
--padding-bottom: 0;
1313
--padding-start: 0;

core/src/themes/ios/default.tokens.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ export const defaultTheme: DefaultTheme = {
122122
borderColor: 'var(--ion-tab-bar-border-color, var(--ion-border-color, var(--ion-color-gray-150)))',
123123
},
124124
IonToolbar: {
125+
activatedButtonColor: 'var(--ion-toolbar-background, var(--background), ion-color(primary, contrast))',
125126
bg: 'var(--ion-toolbar-background, var(--ion-color-gray-50))',
126127
borderColor: 'var(--ion-toolbar-border-color, var(--ion-border-color, var(--ion-color-gray-150)))',
127128
},

core/src/themes/md/dark.tokens.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const darkTheme: DarkTheme = {
2929
background: '#1e1e1e',
3030
},
3131
IonToolbar: {
32-
bg: '#1f1f1f',
32+
bg: 'var(--ion-toolbar-background, #1f1f1f)',
3333
},
3434
IonTabBar: {
3535
background: '#1f1f1f',

core/src/themes/md/default.tokens.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ export const defaultTheme: DefaultTheme = {
113113
borderColor: 'var(--ion-tab-bar-border-color, var(--ion-border-color, var(--ion-color-gray-150)))',
114114
},
115115
IonToolbar: {
116-
bg: `var(--ion-toolbar-background, ${baseDefaultTheme.color!.white})`,
116+
activatedButtonBg: 'var(--ion-toolbar-background, var(--color))',
117+
bg: `var(--ion-toolbar-background, var(--ion-background-color, ${baseDefaultTheme.color!.white}))`,
117118
borderColor: 'var(--ion-toolbar-border-color, var(--ion-border-color, var(--ion-color-gray-150)))',
118119
},
119120
},

core/src/themes/md/high-contrast-dark.tokens.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ export const highContrastDarkTheme: HighContrastDarkTheme = {
1010
/// Borders for elements like toolbars should remain the same
1111
borderColor: 'var(--ion-color-gray-400)',
1212
},
13+
IonToolbar: {
14+
bg: 'var(--ion-toolbar-background, #1f1f1f)',
15+
},
1316
},
1417
};

0 commit comments

Comments
 (0)