style(DatePicker): avoid important syntax in week panel cell inner style (#54634)

Co-authored-by: Khanh Tran <quangkhanhdeveloper@gmail.com>
Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
Jiyur 2025-08-09 21:49:41 +07:00 committed by GitHub
parent 613aad6a5d
commit ed6d440437
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -443,57 +443,46 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
},
// ====================== Week Panel ======================
'&-week-panel': {
// Clear cell style
[`${componentCls}-cell`]: {
[`&:hover ${pickerCellInnerCls},
&-selected ${pickerCellInnerCls},
${pickerCellInnerCls}`]: {
background: 'transparent !important',
'&-week-panel-row': {
td: {
'&:before': {
transition: `background ${motionDurationMid}`,
},
'&:first-child:before': {
borderStartStartRadius: borderRadiusSM,
borderEndStartRadius: borderRadiusSM,
},
'&:last-child:before': {
borderStartEndRadius: borderRadiusSM,
borderEndEndRadius: borderRadiusSM,
},
},
'&-row': {
td: {
'&:hover td:before': {
background: cellHoverBg,
},
'&-range-start td, &-range-end td, &-selected td, &-hover td': {
// Rise priority to override hover style
[`&${pickerCellCls}`]: {
'&:before': {
transition: `background ${motionDurationMid}`,
background: colorPrimary,
},
'&:first-child:before': {
borderStartStartRadius: borderRadiusSM,
borderEndStartRadius: borderRadiusSM,
[`&${componentCls}-cell-week`]: {
color: new FastColor(colorTextLightSolid).setA(0.5).toHexString(),
},
'&:last-child:before': {
borderStartEndRadius: borderRadiusSM,
borderEndEndRadius: borderRadiusSM,
[pickerCellInnerCls]: {
color: colorTextLightSolid,
},
},
},
'&:hover td:before': {
background: cellHoverBg,
},
'&-range-start td, &-range-end td, &-selected td, &-hover td': {
// Rise priority to override hover style
[`&${pickerCellCls}`]: {
'&:before': {
background: colorPrimary,
},
[`&${componentCls}-cell-week`]: {
color: new FastColor(colorTextLightSolid).setA(0.5).toHexString(),
},
[pickerCellInnerCls]: {
color: colorTextLightSolid,
},
},
},
'&-range-hover td:before': {
background: controlItemBgActive,
},
'&-range-hover td:before': {
background: controlItemBgActive,
},
},