Skip to content

Commit 03b223f

Browse files
committed
add best effort for ios/md styles
1 parent 693e6d2 commit 03b223f

File tree

6 files changed

+28
-11
lines changed

6 files changed

+28
-11
lines changed

core/src/components/avatar/avatar.common.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
object-fit: cover;
2525

2626
overflow: hidden;
27-
}
27+
}

core/src/components/avatar/avatar.md.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@
2121
::slotted(ion-badge.badge-vertical-bottom:empty) {
2222
transform: translateX(-100%);
2323
}
24+
25+
:host ::slotted(ion-badge.badge-vertical-top[vertical]:not(:empty)) {
26+
transform: translate(0, 100%);
27+
}
28+
29+
:host ::slotted(ion-badge.badge-vertical-bottom[vertical]:not(:empty)) {
30+
transform: translate(0, -100%);
31+
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,11 @@
6363
:host(:not(.in-tab-button)[vertical].badge-vertical-bottom) {
6464
bottom: 0;
6565
}
66+
67+
:host([vertical]) ::slotted(ion-icon) {
68+
@include position(50%, null, null, 50%);
69+
70+
position: absolute;
71+
72+
transform: translate(-50%, -50%);
73+
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ $badge-font-size: dynamic-font($badge-baseline-font-size);
2626

2727
/// @prop - Font weight of the badge
2828
$badge-font-weight: bold;
29+
30+
/// @prop - Font size of the badge hint
31+
$badge-hint-baseline-font-size: 8px;
32+
33+
/// @prop - Font size of the badge hint
34+
$badge-hint-font-size: dynamic-font($badge-hint-baseline-font-size);

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,6 @@
202202

203203
// Icon Inside Badge Hint
204204
// --------------------------------------------------
205-
:host([vertical]) ::slotted(ion-icon) {
206-
@include globals.position(50%, null, null, 50%);
207-
208-
position: absolute;
209-
210-
transform: translate(-50%, -50%);
211-
}
212-
213205
:host([vertical]) ::slotted(ion-icon) {
214206
width: globals.$ion-scale-300;
215207
height: globals.$ion-scale-300;

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@
1313
}
1414

1515
// TODO(ROU-10747): Review size styles when sizes are defined for native themes.
16-
:host(:empty) {
16+
:host([vertical]) {
1717
--padding-start: 0;
1818
--padding-end: 0;
1919
--padding-bottom: 0;
2020
--padding-top: 0;
2121

22+
font-size: $badge-hint-baseline-font-size;
23+
line-height: 10px;
24+
2225
@include border-radius(999px);
2326

2427
width: $badge-min-width;
2528
height: $badge-min-width;
26-
}
29+
}

0 commit comments

Comments
 (0)