Browse Source

fix: 🐛 add border-radius of the image-mask when hover Card (#42642)

* fix: 🐛 add border-radius of the image-mask when hover Card

* Apply suggestions from code review

Optimize the css code structure

Co-authored-by: afc163 <afc163@gmail.com>

---------

Co-authored-by: liugenmei@yzw.cn <liugenmei@yzw.cn>
Co-authored-by: afc163 <afc163@gmail.com>
pull/42650/head
Goku 2 years ago
committed by GitHub
parent
commit
98e391ca93
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      components/card/style/index.ts

3
components/card/style/index.ts

@ -224,6 +224,7 @@ const genCardLoadingStyle: GenerateStyle<CardToken> = (token): CSSObject => {
// ============================== Basic ============================== // ============================== Basic ==============================
const genCardStyle: GenerateStyle<CardToken> = (token): CSSObject => { const genCardStyle: GenerateStyle<CardToken> = (token): CSSObject => {
const { const {
antCls,
componentCls, componentCls,
cardShadow, cardShadow,
cardHeadPadding, cardHeadPadding,
@ -268,7 +269,7 @@ const genCardStyle: GenerateStyle<CardToken> = (token): CSSObject => {
width: '100%', width: '100%',
}, },
img: { [`img, img + ${antCls}-image-mask`]: {
borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px 0 0`, borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px 0 0`,
}, },
}, },

Loading…
Cancel
Save