Skip to content

Commit 041689b

Browse files
committed
fix(toolbar): use the correct contrast color for MD toolbar
fixes ionic-team#11848
1 parent e354f21 commit 041689b

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

scripts/e2e/variables.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@ $colors: (
3131
light: #f4f4f4,
3232
dark: #222,
3333
vibrant: rebeccapurple,
34-
bright: #ffc125
34+
bright: #ffc125,
35+
greyYellow: (
36+
base:#49606e,
37+
contrast:#fbb636
38+
),
39+
greyWhite: (
40+
base:#49606e,
41+
contrast:#fff
42+
)
3543
);
3644

3745

src/components/toolbar/test/colors/pages/root-page/root-page.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,11 @@
199199
<ion-icon name="menu"></ion-icon>
200200
</button>
201201
</ion-toolbar>
202+
203+
<ion-toolbar color="greyYellow">
204+
<ion-title>Grey Yellow</ion-title>
205+
</ion-toolbar>
206+
<ion-toolbar color="greyWhite">
207+
<ion-title>Grey White</ion-title>
208+
</ion-toolbar>
202209
</ion-content>

src/components/toolbar/toolbar.md.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ $toolbar-button-md-strong-font-weight: bold !default;
116116

117117
@mixin md-toolbar-theme($color-name, $color-base, $color-contrast) {
118118
.toolbar-md-#{$color-name} {
119-
$fg-color: color-contrast($colors-md, $color-base, md);
120119

121120
.toolbar-background-md {
122121
background: $color-base;
@@ -126,19 +125,19 @@ $toolbar-button-md-strong-font-weight: bold !default;
126125
.bar-button-default-md,
127126
.bar-button-outline-md,
128127
.toolbar-title-md {
129-
color: $fg-color;
128+
color: $color-contrast;
130129
}
131130

132131
.bar-button-clear-md,
133132
.bar-button-default-md,
134133
.bar-button-outline-md {
135134
.button-effect {
136-
background-color: $fg-color;
135+
background-color: $color-contrast;
137136
}
138137
}
139138

140139
.bar-button-outline-md {
141-
border-color: $fg-color;
140+
border-color: $color-contrast;
142141
}
143142

144143
@each $color-name, $color-base, $color-contrast in get-colors($colors-md) {

0 commit comments

Comments
 (0)