Skip to content

Commit a786cc1

Browse files
committed
fix(toast): move the background and colors to the subtle and bold classes
1 parent be28b4f commit a786cc1

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

core/src/components/toast/toast.ionic.scss

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
// --------------------------------------------------
66

77
:host {
8-
--background: #{globals.$ion-primitives-neutral-1200};
98
--box-shadow: #{globals.$ion-elevation-4};
10-
--button-color: #{globals.$ion-primitives-base-white};
11-
--color: #{globals.$ion-primitives-base-white};
129
--max-width: 343px;
1310
--start: 8px;
1411
--end: 8px;
@@ -133,13 +130,30 @@
133130
font-size: globals.$ion-scale-600;
134131
}
135132

133+
// Bold Toast
134+
// --------------------------------------------------
135+
136+
:host(.toast-hue-bold) {
137+
--background: #{globals.ion-color(secondary, base)};
138+
--background-activated: #{globals.ion-color(secondary, shade)};
139+
--color: #{globals.ion-color(secondary, contrast)};
140+
--button-color: #{globals.ion-color(secondary, contrast)};
141+
}
142+
143+
:host(.toast-hue-bold.ion-color) .toast-wrapper {
144+
background: globals.current-color(base);
145+
color: globals.current-color(contrast);
146+
}
147+
148+
136149
// Subtle Toast
137150
// --------------------------------------------------
138151

139-
:host(.toast-hue-subtle) .toast-wrapper {
140-
--background: #{globals.ion-color(primary, base, $subtle: true)};
141-
--background-activated: #{globals.ion-color(primary, shade, $subtle: true)};
142-
--color: #{globals.ion-color(primary, contrast, $subtle: true)};
152+
:host(.toast-hue-subtle) {
153+
--background: #{globals.ion-color(secondary, base, $subtle: true)};
154+
--background-activated: #{globals.ion-color(secondary, shade, $subtle: true)};
155+
--color: #{globals.ion-color(secondary, contrast, $subtle: true)};
156+
--button-color: #{globals.ion-color(secondary, contrast, $subtle: true)};
143157
}
144158

145159
:host(.toast-hue-subtle.ion-color) .toast-wrapper {

0 commit comments

Comments
 (0)