Skip to content

Commit dc4ec1d

Browse files
CR
1 parent 01d47c3 commit dc4ec1d

File tree

5 files changed

+44
-30
lines changed

5 files changed

+44
-30
lines changed

core/src/components/badge/badge.common.scss

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,3 @@
6363
:host(:not(.in-tab-button)[vertical].badge-vertical-bottom) {
6464
bottom: 0;
6565
}
66-
67-
// Badge in Button
68-
// --------------------------------------------------
69-
70-
:host(:not(:empty).in-button) {
71-
min-width: $badge-size-in-button;
72-
height: $badge-size-in-button;
73-
74-
font-size: $badge-font-size-in-button;
75-
76-
line-height: $badge-line-height-in-button;
77-
78-
::slotted(ion-icon) {
79-
width: $badge-icon-size-in-button;
80-
height: $badge-icon-size-in-button;
81-
}
82-
}

core/src/components/badge/badge.common.vars.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@import "../../themes/functions.font";
2-
@import "../../themes/functions.sizes";
32

43
// Badge
54
// --------------------------------------------------
@@ -27,15 +26,3 @@ $badge-font-size: dynamic-font($badge-baseline-font-size);
2726

2827
/// @prop - Font weight of the badge
2928
$badge-font-weight: bold;
30-
31-
/// @prop - Size of the badge when inside button
32-
$badge-size-in-button: 16px;
33-
34-
/// @prop - Font size of the badge when inside button
35-
$badge-font-size-in-button: px-to-rem(12);
36-
37-
/// @prop - Line height of the badge when inside button
38-
$badge-line-height-in-button: 20px;
39-
40-
/// @prop - Size of of the badge icon when inside button
41-
$badge-icon-size-in-button: 12px;

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,17 @@
213213
:host([vertical]:not(.in-tab-button).in-button.badge-xlarge) {
214214
@include globals.position(null, globals.$ion-space-050);
215215
}
216+
217+
:host(:not(:empty).in-button) {
218+
min-width: globals.$ion-scale-400;
219+
height: globals.$ion-scale-400;
220+
221+
font-size: globals.$ion-font-size-300;
222+
223+
line-height: globals.$ion-font-line-height-500;
224+
225+
::slotted(ion-icon) {
226+
width: globals.$ion-scale-300;
227+
height: globals.$ion-scale-300;
228+
}
229+
}

core/src/components/badge/badge.native.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,20 @@
2929

3030
line-height: 10px;
3131
}
32+
33+
// Badge in Button
34+
// --------------------------------------------------
35+
36+
:host(:not(:empty).in-button) {
37+
min-width: $badge-size-in-button;
38+
height: $badge-size-in-button;
39+
40+
font-size: $badge-font-size-in-button;
41+
42+
line-height: $badge-line-height-in-button;
43+
44+
::slotted(ion-icon) {
45+
width: $badge-icon-size-in-button;
46+
height: $badge-icon-size-in-button;
47+
}
48+
}

core/src/components/badge/badge.native.vars.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import "../../themes/functions.font";
2+
@import "../../themes/functions.sizes";
23

34
// Badge
45
// --------------------------------------------------
@@ -8,3 +9,15 @@ $badge-hint-baseline-font-size: 8px;
89

910
/// @prop - Font size of the badge hint
1011
$badge-hint-font-size: dynamic-font($badge-hint-baseline-font-size);
12+
13+
/// @prop - Size of the badge when inside button
14+
$badge-size-in-button: 16px;
15+
16+
/// @prop - Font size of the badge when inside button
17+
$badge-font-size-in-button: px-to-rem(12);
18+
19+
/// @prop - Line height of the badge when inside button
20+
$badge-line-height-in-button: 20px;
21+
22+
/// @prop - Size of of the badge icon when inside button
23+
$badge-icon-size-in-button: 12px;

0 commit comments

Comments
 (0)