fix: tree switch bg height (#50313)

* fix: tree switch bg height

* fix: use before instead
pull/50317/head^2
二货爱吃白萝卜 6 months ago committed by GitHub
parent 426082dfc1
commit 0cf4a27e96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -245,13 +245,27 @@ export const genBaseStyle = (prefixCls: string, token: TreeToken): CSSObject =>
cursor: 'pointer',
userSelect: 'none',
transition: `all ${token.motionDurationSlow}`,
borderRadius: token.borderRadius,
'&-noop': {
cursor: 'unset',
},
[`&:not(${treeCls}-switcher-noop):hover`]: {
'&:before': {
pointerEvents: 'none',
content: '""',
width: titleHeight,
height: titleHeight,
position: 'absolute',
left: {
_skip_check_: true,
value: 0,
},
top: 0,
borderRadius: token.borderRadius,
transition: `all ${token.motionDurationSlow}`,
},
[`&:not(${treeCls}-switcher-noop):hover:before`]: {
backgroundColor: token.colorBgTextHover,
},

Loading…
Cancel
Save