@@ -73,9 +73,12 @@ const genSharedBadgeStyle: GenerateStyle<BadgeToken> = (token: BadgeToken): CSSO
7373 const ribbonPrefixCls = `${ antCls } -ribbon` ;
7474 const ribbonWrapperPrefixCls = `${ antCls } -ribbon-wrapper` ;
7575
76- const statusPreset = genPresetColor ( token , ( colorKey , { darkColor } ) => ( {
77- [ `${ componentCls } -status -${ colorKey } ` ] : {
76+ const colorPreset = genPresetColor ( token , ( colorKey , { darkColor } ) => ( {
77+ [ `& ${ componentCls } ${ componentCls } -color -${ colorKey } ` ] : {
7878 background : darkColor ,
79+ [ `&:not(${ componentCls } -count)` ] : {
80+ color : darkColor ,
81+ } ,
7982 } ,
8083 } ) ) ;
8184
@@ -150,9 +153,9 @@ const genSharedBadgeStyle: GenerateStyle<BadgeToken> = (token: BadgeToken): CSSO
150153 insetInlineEnd : 0 ,
151154 transform : 'translate(50%, -50%)' ,
152155 transformOrigin : '100% 0%' ,
153- [ `${ iconCls } -spin` ] : {
156+ [ `& ${ iconCls } -spin` ] : {
154157 animationName : antBadgeLoadingCircle ,
155- animationDuration : token . motionDurationMid ,
158+ animationDuration : '1s' ,
156159 animationIterationCount : 'infinite' ,
157160 animationTimingFunction : 'linear' ,
158161 } ,
@@ -207,13 +210,13 @@ const genSharedBadgeStyle: GenerateStyle<BadgeToken> = (token: BadgeToken): CSSO
207210 [ `${ componentCls } -status-warning` ] : {
208211 backgroundColor : token . colorWarning ,
209212 } ,
210- ...statusPreset ,
211213 [ `${ componentCls } -status-text` ] : {
212214 marginInlineStart : marginXS ,
213215 color : token . colorText ,
214216 fontSize : token . fontSize ,
215217 } ,
216218 } ,
219+ ...colorPreset ,
217220 [ `${ componentCls } -zoom-appear, ${ componentCls } -zoom-enter` ] : {
218221 animationName : antZoomBadgeIn ,
219222 animationDuration : token . motionDurationSlow ,
@@ -284,7 +287,6 @@ const genSharedBadgeStyle: GenerateStyle<BadgeToken> = (token: BadgeToken): CSSO
284287 ...resetComponent ( token ) ,
285288 position : 'absolute' ,
286289 top : marginXS ,
287- height : badgeFontHeight ,
288290 padding : `0 ${ token . paddingXS } px` ,
289291 color : token . colorPrimary ,
290292 lineHeight : `${ badgeFontHeight } px` ,
0 commit comments