mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
47d73d8e33
* chore: more style * chore: more style * chore: more and more * chore: more and more * chore: all about it * chore: more style * chore: more & more * chore: more * chore: hover style * chore: theme of it * move * chore: status color * chore: full token * chore: update * chore: update * chore: force cache update * chore: force cache back * fix: commented
58 lines
1.5 KiB
TypeScript
58 lines
1.5 KiB
TypeScript
import type { MenuThemeToken } from '.';
|
|
import type { GenerateStyle } from '../../_util/theme';
|
|
|
|
const getHorizontalStyle: GenerateStyle<MenuThemeToken> = token => {
|
|
const {
|
|
componentCls,
|
|
motionDurationSlow,
|
|
menuHorizontalHeight,
|
|
colorBorderSecondary,
|
|
lineWidth,
|
|
lineType,
|
|
menuItemPaddingInline,
|
|
} = token;
|
|
|
|
return {
|
|
[`${componentCls}-horizontal`]: {
|
|
lineHeight: `${menuHorizontalHeight}px`,
|
|
border: 0,
|
|
borderBottom: `${lineWidth}px ${lineType} ${colorBorderSecondary}`,
|
|
boxShadow: 'none',
|
|
|
|
'&::after': {
|
|
display: 'block',
|
|
clear: 'both',
|
|
height: 0,
|
|
content: '"\\20"',
|
|
},
|
|
|
|
// ======================= Item =======================
|
|
[`${componentCls}-item, ${componentCls}-submenu`]: {
|
|
position: 'relative',
|
|
display: 'inline-block',
|
|
verticalAlign: 'bottom',
|
|
paddingInline: menuItemPaddingInline,
|
|
},
|
|
|
|
[`> ${componentCls}-item:hover,
|
|
> ${componentCls}-item-active,
|
|
> ${componentCls}-submenu ${componentCls}-submenu-title:hover`]: {
|
|
backgroundColor: 'transparent',
|
|
},
|
|
|
|
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
|
|
transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`].join(
|
|
',',
|
|
),
|
|
},
|
|
|
|
// ===================== Sub Menu =====================
|
|
[`${componentCls}-submenu-arrow`]: {
|
|
display: 'none',
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
export default getHorizontalStyle;
|