Skip to content

Commit c546566

Browse files
committed
fix(button): update ion-color for ionic theme
1 parent 21293da commit c546566

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

core/src/components/button/button.ionic.scss

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,6 @@
5353
--ripple-color: var(--background-activated);
5454
}
5555

56-
:host(.button-solid.ion-color) {
57-
--background-activated: #{globals.current-color(shade)};
58-
--background-hover: #{globals.current-color(shade)};
59-
--background: #{globals.current-color(base)};
60-
--color: #{globals.current-color(contrast)};
61-
}
62-
6356
// Outline Button
6457
// --------------------------------------------------
6558

@@ -76,13 +69,6 @@
7669
--ripple-color: var(--background-activated);
7770
}
7871

79-
:host(.button-outline.ion-color) {
80-
--background-activated: #{globals.current-color(shade, $subtle: true)};
81-
--background-hover: #{globals.current-color(shade, $subtle: true)};
82-
--border-color: #{globals.current-color(base)};
83-
--color: #{globals.current-color(base)};
84-
}
85-
8672
// Warning Outline Button - use foreground color for text and border
8773
:host(.button-outline.ion-color-warning) .button-native {
8874
border-color: #{globals.current-color(foreground)};
@@ -103,9 +89,16 @@
10389
--ripple-color: var(--background-activated);
10490
}
10591

106-
:host(.button-clear.ion-color) {
107-
--background-activated: #{globals.current-color(shade, $subtle: true)};
108-
--background-hover: #{globals.current-color(shade, $subtle: true)};
92+
// Ripple Effect
93+
// -------------------------------------------------------------------------------
94+
95+
:host(.button-solid.ion-color) ion-ripple-effect {
96+
color: globals.current-color(shade);
97+
}
98+
99+
:host(.button-outline.ion-color) ion-ripple-effect,
100+
:host(.button-clear.ion-color) ion-ripple-effect {
101+
color: globals.current-color(shade, $subtle: true);
109102
}
110103

111104
// Button Sizes
@@ -225,8 +218,15 @@
225218
background: globals.current-color(shade);
226219
}
227220

221+
:host(.button-outline.ion-color.ion-activated) .button-native::after,
222+
:host(.button-clear.ion-color.ion-activated) .button-native::after {
223+
background: globals.current-color(shade, $subtle: true);
224+
}
225+
228226
:host(.ion-activated) .button-native:has(ion-ripple-effect)::after,
229-
:host(.button-solid.ion-color.ion-activated) .button-native:has(ion-ripple-effect)::after {
227+
:host(.button-solid.ion-color.ion-activated) .button-native:has(ion-ripple-effect)::after,
228+
:host(.button-outline.ion-color.ion-activated) .button-native:has(ion-ripple-effect)::after,
229+
:host(.button-clear.ion-color.ion-activated) .button-native:has(ion-ripple-effect)::after {
230230
background: transparent;
231231
}
232232

@@ -237,6 +237,11 @@
237237
:host(.button-solid.ion-color:hover) .button-native::after {
238238
background: globals.current-color(shade);
239239
}
240+
241+
:host(.button-outline.ion-color:hover) .button-native::after,
242+
:host(.button-clear.ion-color:hover) .button-native::after {
243+
background: globals.current-color(shade, $subtle: true);
244+
}
240245
}
241246

242247
// Button: Disabled

0 commit comments

Comments
 (0)