Skip to content

Commit 045bc59

Browse files
fix(theming): update components to use the proper colors for dark themes (#18735)
references #18713
1 parent 08af35a commit 045bc59

25 files changed

+360
-247
lines changed

core/src/components/action-sheet/action-sheet.ios.vars.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $action-sheet-ios-title-border-style: solid !default
6565
$action-sheet-ios-title-border-color-alpha: .08 !default;
6666

6767
/// @prop - Border color of the action sheet title
68-
$action-sheet-ios-title-border-color: rgba(var(--ion-text-color-rgb, $text-color-rgb), $action-sheet-ios-title-border-color-alpha) !default;
68+
$action-sheet-ios-title-border-color: rgba($text-color-rgb, $action-sheet-ios-title-border-color-alpha) !default;
6969

7070

7171
// Action Sheet Subtitle
@@ -124,7 +124,7 @@ $action-sheet-ios-button-border-style: solid !default
124124
$action-sheet-ios-button-border-color-alpha: .08 !default;
125125

126126
/// @prop - Border color of the action sheet button
127-
$action-sheet-ios-button-border-color: rgba(var(--ion-text-color-rgb, $text-color-rgb), $action-sheet-ios-button-border-color-alpha) !default;
127+
$action-sheet-ios-button-border-color: rgba($text-color-rgb, $action-sheet-ios-button-border-color-alpha) !default;
128128

129129
/// @prop - Background color of the action sheet button
130130
$action-sheet-ios-button-background: transparent !default;
@@ -133,7 +133,7 @@ $action-sheet-ios-button-background: transparent !d
133133
$action-sheet-ios-button-background-alpha-activated: .08 !default;
134134

135135
/// @prop - Background color of the activated action sheet button
136-
$action-sheet-ios-button-background-activated: rgba(var(--ion-text-color-rgb, $text-color-rgb), $action-sheet-ios-button-background-alpha-activated) !default;
136+
$action-sheet-ios-button-background-activated: rgba($text-color-rgb, $action-sheet-ios-button-background-alpha-activated) !default;
137137

138138
/// @prop - Background color of the selected action sheet button
139139
$action-sheet-ios-button-background-selected: $background-color !default;

core/src/components/action-sheet/action-sheet.md.vars.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ $action-sheet-md-padding-bottom: 0 !default;
2323
$action-sheet-md-title-height: 60px !default;
2424

2525
/// @prop - Color of the action sheet title
26-
$action-sheet-md-title-color: rgba(var(--ion-text-color-rgb, $text-color-rgb), 0.54) !default;
26+
$action-sheet-md-title-color: rgba($text-color-rgb, 0.54) !default;
2727

2828
/// @prop - Font size of the action sheet title
2929
$action-sheet-md-title-font-size: 16px !default;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ $alert-ios-button-background-color: transparent !default;
152152
$alert-ios-button-background-color-alpha-activated: .1 !default;
153153

154154
/// @prop - Background color of the alert activated button
155-
$alert-ios-button-background-color-activated: rgba(var(--ion-text-color-rgb, $text-color-rgb), $alert-ios-button-background-color-alpha-activated) !default;
155+
$alert-ios-button-background-color-activated: rgba($text-color-rgb, $alert-ios-button-background-color-alpha-activated) !default;
156156

157157
/// @prop - Border width of the alert button
158158
$alert-ios-button-border-width: $hairlines-width !default;
@@ -164,7 +164,7 @@ $alert-ios-button-border-style: solid !default;
164164
$alert-ios-button-border-color-alpha: .2 !default;
165165

166166
/// @prop - Border color of the alert button
167-
$alert-ios-button-border-color: rgba(var(--ion-text-color-rgb, $text-color-rgb), $alert-ios-button-border-color-alpha) !default;
167+
$alert-ios-button-border-color: rgba($text-color-rgb, $alert-ios-button-border-color-alpha) !default;
168168

169169
/// @prop - Border radius of the alert button
170170
$alert-ios-button-border-radius: 0 !default;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ $button-md-outline-box-shadow: none !default;
122122
$button-md-outline-background-color-alpha-hover: .1 !default;
123123

124124
/// @prop - Background color of the outline button on hover
125-
$button-md-outline-background-color-hover: rgba(var(--ion-text-color-rgb, $text-color-rgb), $button-md-outline-background-color-alpha-hover) !default;
125+
$button-md-outline-background-color-hover: rgba($text-color-rgb, $button-md-outline-background-color-alpha-hover) !default;
126126

127127
/// @prop - Background color of the activated outline button
128128
$button-md-outline-background-color-activated: transparent !default;
@@ -158,7 +158,7 @@ $button-md-clear-opacity: 1 !default;
158158
$button-md-clear-background-color-alpha-activated: .1 !default;
159159

160160
/// @prop - Background color of the activated clear button
161-
$button-md-clear-background-color-activated: rgba(var(--ion-text-color-rgb, $text-color-rgb), $button-md-clear-background-color-alpha-activated) !default;
161+
$button-md-clear-background-color-activated: rgba($text-color-rgb, $button-md-clear-background-color-alpha-activated) !default;
162162

163163
/// @prop - Box shadow of the activated clear button
164164
$button-md-clear-box-shadow-activated: $button-md-clear-box-shadow !default;
@@ -167,7 +167,7 @@ $button-md-clear-box-shadow-activated: $button-md-clear-box-sha
167167
$button-md-clear-background-color-alpha-hover: .1 !default;
168168

169169
/// @prop - Background color of the clear button on hover
170-
$button-md-clear-background-color-hover: rgba(var(--ion-text-color-rgb, $text-color-rgb), $button-md-clear-background-color-alpha-hover) !default;
170+
$button-md-clear-background-color-hover: rgba($text-color-rgb, $button-md-clear-background-color-alpha-hover) !default;
171171

172172
/// @prop - Background color of the ripple on the clear button
173173
$button-md-clear-ripple-background-color: $text-color-step-600 !default;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $checkbox-ios-background-color-focused: ion-color(primary, tint) !default;
1717
$checkbox-ios-icon-size: 26px !default;
1818

1919
/// @prop - Border color of the checkbox icon when off
20-
$checkbox-ios-icon-border-color-off: $item-ios-border-color !default;
20+
$checkbox-ios-icon-border-color-off: rgba($text-color-rgb, 0.23) !default;
2121

2222
/// @prop - Border color of the checkbox icon when on
2323
$checkbox-ios-icon-border-color-on: $checkbox-ios-background-color-on !default;

core/src/components/checkbox/checkbox.md.vars.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ $checkbox-md-icon-border-style: solid !default;
3838
$checkbox-md-icon-border-radius: 2px !default;
3939

4040
/// @prop - Border color of the checkbox icon when off
41-
$checkbox-md-icon-border-color-off: rgba(0, 0, 0, .54) !default;
41+
$checkbox-md-icon-border-color-off: rgba($text-color-rgb, .51) !default;
4242

4343
/// @prop - Border color of the checkbox icon when on
4444
$checkbox-md-icon-border-color-on: ion-color(primary, base) !default;

core/src/components/chip/chip.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* @prop --background: Background of the chip
66
* @prop --color: Color of the chip
77
*/
8-
--background: rgba(0, 0, 0, .12);
9-
--color: rgba(0, 0, 0, .87);
8+
--background: #{rgba($text-color-rgb, .12)};
9+
--color: #{rgba($text-color-rgb, .87)};
1010

1111
@include border-radius(16px);
1212
@include font-smoothing();
@@ -128,15 +128,15 @@
128128
}
129129

130130
:host(:focus) {
131-
--background: rgba(0, 0, 0, .16);
131+
--background: #{rgba($text-color-rgb, .16)};
132132
}
133133

134134

135135
// Chip: Activated
136136
// ---------------------------------------------
137137

138138
:host(.activated) {
139-
--background: rgba(0, 0, 0, .20);
139+
--background: #{rgba($text-color-rgb, .20)};
140140
}
141141

142142

@@ -145,14 +145,14 @@
145145

146146
@media (any-hover: hover) {
147147
:host(:hover) {
148-
--background: rgba(0, 0, 0, .16);
148+
--background: #{rgba($text-color-rgb, .16)};
149149
}
150150

151151
:host(.ion-color:hover) {
152152
background: current-color(base, .12);
153153
}
154154

155155
:host(.chip-outline:not(.ion-color):hover) {
156-
background: rgba(0, 0, 0, .04);
156+
background: rgba($text-color-rgb, .04);
157157
}
158158
}

core/src/components/fab-button/fab-button.md.vars.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $fab-md-list-button-background-color-activated: ion-color(light, shade) !defau
3131
$fab-md-list-button-background-color-hover: ion-color(light, tint) !default;
3232

3333
/// @prop - Text color of the button in a list
34-
$fab-md-list-button-text-color: rgba(var(--ion-text-color-rgb, $text-color-rgb), 0.54) !default;
34+
$fab-md-list-button-text-color: rgba($text-color-rgb, 0.54) !default;
3535

3636
/// @prop - Font size of the button icon in a list
3737
$fab-md-list-button-icon-font-size: 18px !default;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $item-ios-paragraph-margin-start: $item-ios-paragraph-margin-end !def
2525
$item-ios-paragraph-font-size: 14px !default;
2626

2727
/// @prop - Color of the item paragraph
28-
$item-ios-paragraph-text-color: $text-color-step-600 !default;
28+
$item-ios-paragraph-text-color: rgba($text-color-rgb, .4) !default;
2929

3030
/// @prop - Width of the avatar in the item
3131
$item-ios-avatar-width: 36px !default;

core/src/components/item/item.md.vars.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ $item-md-icon-end-slot-margin-start: 16px !default;
133133
$item-md-icon-end-slot-margin-end: null !default;
134134

135135
/// @prop - Color for an icon in the start/end slot
136-
$item-md-icon-slot-color: rgba(var(--ion-text-color-rgb, $text-color-rgb), 0.54) !default;
136+
$item-md-icon-slot-color: rgba($text-color-rgb, 0.54) !default;
137137

138138
/// @prop - Font size of an icon in the start/end slot
139139
$item-md-icon-slot-font-size: 24px !default;

0 commit comments

Comments
 (0)