Skip to content

Commit 78045b4

Browse files
committed
fix: Badge Animation enter and leave in RTL
1 parent 894a5b9 commit 78045b4

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

components/badge/style/rtl.less

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
&:not(&-not-a-wrapper) &-count,
77
&:not(&-not-a-wrapper) &-dot,
88
&:not(&-not-a-wrapper) .@{number-prefix-cls}-custom-component {
9-
.@{badge-prefix-cls}-rtl & {
9+
.@{badge-prefix-cls}-rtl& {
1010
right: auto;
1111
left: 0;
1212
direction: ltr;
@@ -30,6 +30,17 @@
3030
}
3131
}
3232
}
33+
34+
&:not(&-not-a-wrapper).@{badge-prefix-cls}-rtl {
35+
.@{badge-prefix-cls}-zoom-appear,
36+
.@{badge-prefix-cls}-zoom-enter {
37+
animation-name: antZoomBadgeInRtl;
38+
}
39+
40+
.@{badge-prefix-cls}-zoom-leave {
41+
animation-name: antZoomBadgeOutRtl;
42+
}
43+
}
3344
}
3445

3546
.@{ribbon-prefix-cls}-rtl {
@@ -65,3 +76,25 @@
6576
}
6677
}
6778
}
79+
80+
@keyframes antZoomBadgeInRtl {
81+
0% {
82+
transform: scale(0) translate(-50%, -50%);
83+
opacity: 0;
84+
}
85+
86+
100% {
87+
transform: scale(1) translate(-50%, -50%);
88+
}
89+
}
90+
91+
@keyframes antZoomBadgeOutRtl {
92+
0% {
93+
transform: scale(1) translate(-50%, -50%);
94+
}
95+
96+
100% {
97+
transform: scale(0) translate(-50%, -50%);
98+
opacity: 0;
99+
}
100+
}

0 commit comments

Comments
 (0)