Skip to content

Commit

Permalink
fix: Menu submenu hover style (#47227)
Browse files Browse the repository at this point in the history
* fix: Menu submenu hover style

* chore: code clean
  • Loading branch information
MadCcc committed Jan 30, 2024
1 parent fff8a93 commit 9473ebf
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions components/menu/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ export interface MenuToken extends FullToken<'Menu'> {
menuHorizontalHeight: number | string;
menuArrowSize: number | string;
menuArrowOffset: number | string;
menuPanelMaskInset: number;
menuSubMenuBg: string;
darkPopupBg: string;
}
Expand Down Expand Up @@ -528,7 +527,6 @@ const getBaseStyle: GenerateStyle<MenuToken> = (token) => {
menuArrowSize,
menuArrowOffset,
lineType,
menuPanelMaskInset,
groupTitleLineHeight,
groupTitleFontSize,
} = token;
Expand Down Expand Up @@ -680,7 +678,7 @@ const getBaseStyle: GenerateStyle<MenuToken> = (token) => {
// https://github.com/ant-design/ant-design/issues/13955
'&::before': {
position: 'absolute',
inset: `${unit(menuPanelMaskInset)} 0 0`,
inset: 0,
zIndex: -1,
width: '100%',
height: '100%',
Expand All @@ -704,12 +702,6 @@ const getBaseStyle: GenerateStyle<MenuToken> = (token) => {
},
},

// https://github.com/ant-design/ant-design/issues/13955
'&-placement-rightTop::before': {
top: 0,
insetInlineStart: menuPanelMaskInset,
},

[`
&-placement-leftTop,
&-placement-bottomRight,
Expand Down Expand Up @@ -977,7 +969,6 @@ export default (prefixCls: string, rootCls: string = prefixCls, injectStyle: boo
menuArrowSize,
menuHorizontalHeight: token.calc(controlHeightLG).mul(1.15).equal(),
menuArrowOffset: token.calc(menuArrowSize).mul(0.25).equal(),
menuPanelMaskInset: -7, // Still a hardcode here since it's offset by rc-align
menuSubMenuBg: colorBgElevated,
calc: token.calc,
popupBg,
Expand Down

0 comments on commit 9473ebf

Please sign in to comment.