From 87f186603274430a543ebc2bc9e6f4d9af2e0801 Mon Sep 17 00:00:00 2001 From: Hamed Mohammadzadeh <36853974+hmz22@users.noreply.github.com> Date: Tue, 22 Mar 2022 02:44:19 +0430 Subject: [PATCH] fix: Badge Animation enter and leave in RTL --- components/badge/style/rtl.less | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/components/badge/style/rtl.less b/components/badge/style/rtl.less index a322596929da..763e5ba8fbf2 100644 --- a/components/badge/style/rtl.less +++ b/components/badge/style/rtl.less @@ -30,6 +30,19 @@ } } } + + &-zoom-appear, + &-zoom-enter { + .@{badge-prefix-cls}-rtl & { + animation-name: antZoomBadgeInRtl; + } + } + + &-zoom-leave { + .@{badge-prefix-cls}-rtl & { + animation-name: antZoomBadgeOutRtl; + } + } } .@{ribbon-prefix-cls}-rtl { @@ -65,3 +78,24 @@ } } } + + +@keyframes antZoomBadgeInRtl { + 0% { + transform: scale(0) translate(-50%, -50%); + opacity: 0; + } + 100% { + transform: scale(1) translate(-50%, -50%); + } +} + +@keyframes antZoomBadgeOutRtl { + 0% { + transform: scale(1) translate(-50%, -50%); + } + 100% { + transform: scale(0) translate(-50%, -50%); + opacity: 0; + } +}