Skip to content

Commit b472c6c

Browse files
committed
fix(badge): split badge color into separate modes
make it so they can use a different badge by default per mode references #5222
1 parent 93b9891 commit b472c6c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

ionic/components/badge/badge.ios.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
// --------------------------------------------------
55

66
$badge-ios-border-radius: 10px !default;
7+
$badge-ios-background-color: map-get($colors-ios, primary) !default;
78

89

910
ion-badge {
1011
border-radius: $badge-ios-border-radius;
12+
background-color: $badge-ios-background-color;
13+
color: inverse($badge-ios-background-color);
1114
}
1215

1316

ionic/components/badge/badge.md.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
// Material Design Badge
44
// --------------------------------------------------
55

6-
$badge-md-border-radius: 4px !default;
6+
$badge-md-border-radius: 4px !default;
7+
$badge-md-background-color: map-get($colors-md, primary) !default;
78

89

910
ion-badge {
1011
border-radius: $badge-md-border-radius;
12+
background-color: $badge-md-background-color;
13+
color: inverse($badge-md-background-color);
1114
}
1215

1316

ionic/components/badge/badge.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
$badge-font-size: 1.3rem !default;
77
$badge-font-weight: bold !default;
8-
$badge-background-color: map-get($colors, primary);
98

109

1110
ion-badge {
@@ -22,9 +21,6 @@ ion-badge {
2221
font-weight: $badge-font-weight;
2322
line-height: 1;
2423

25-
background-color: $badge-background-color;
26-
color: inverse($badge-background-color);
27-
2824
&:empty {
2925
display: none;
3026
}

0 commit comments

Comments
 (0)