Skip to content

Commit f2ea38f

Browse files
feat(badge): add ionic theme styling for badges with icons
1 parent f6ce023 commit f2ea38f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

core/src/components/badge/badge.ionic.scss

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
line-height: globals.$ion-font-line-height-400;
6161
}
6262

63+
:host(.badge-xxsmall) ::slotted(ion-icon) {
64+
width: globals.$ion-scale-250;
65+
height: globals.$ion-scale-250;
66+
}
67+
6368
/* Extra Small Badge */
6469
:host(.badge-xsmall) {
6570
--padding-start: #{globals.$ion-space-100};
@@ -73,6 +78,11 @@
7378
line-height: globals.$ion-font-line-height-600;
7479
}
7580

81+
:host(.badge-xsmall) ::slotted(ion-icon) {
82+
width: globals.$ion-scale-400;
83+
height: globals.$ion-scale-400;
84+
}
85+
7686
/* Small Badge */
7787
:host(.badge-small) {
7888
--padding-start: #{globals.$ion-space-100};
@@ -86,6 +96,11 @@
8696
line-height: globals.$ion-font-line-height-600;
8797
}
8898

99+
:host(.badge-small) ::slotted(ion-icon) {
100+
width: globals.$ion-scale-500;
101+
height: globals.$ion-scale-500;
102+
}
103+
89104
/* Medium Badge */
90105
:host(.badge-medium) {
91106
min-width: globals.$ion-scale-1000;
@@ -96,6 +111,11 @@
96111
line-height: globals.$ion-font-line-height-700;
97112
}
98113

114+
:host(.badge-medium) ::slotted(ion-icon) {
115+
width: globals.$ion-scale-600;
116+
height: globals.$ion-scale-600;
117+
}
118+
99119
/* Large Badge */
100120
:host(.badge-large) {
101121
min-width: globals.$ion-scale-1200;
@@ -106,6 +126,11 @@
106126
line-height: globals.$ion-font-line-height-700;
107127
}
108128

129+
:host(.badge-large) ::slotted(ion-icon) {
130+
width: globals.$ion-scale-800;
131+
height: globals.$ion-scale-800;
132+
}
133+
109134
/* Extra Large Badge */
110135
:host(.badge-xlarge) {
111136
min-width: globals.$ion-scale-1400;
@@ -115,3 +140,8 @@
115140

116141
line-height: globals.$ion-font-line-height-700;
117142
}
143+
144+
:host(.badge-xlarge) ::slotted(ion-icon) {
145+
width: globals.$ion-scale-1000;
146+
height: globals.$ion-scale-1000;
147+
}

0 commit comments

Comments
 (0)