diff --git a/style/web/components/menu/_docs.less b/style/web/components/menu/_docs.less index 6e0fc2beab..179dc8e8ce 100644 --- a/style/web/components/menu/_docs.less +++ b/style/web/components/menu/_docs.less @@ -78,26 +78,11 @@ } } -.t-menu__logo { - & > * { - margin-left: 24px; - } -} - -.t-is-collapsed { - .t-menu__logo { - & > * { - margin: 0 auto; - } - } -} - .@{d-prefix}-demo-item--menu { --bg-color-demo: var(--bg-color-demo-secondary); } .@{d-prefix}-demo-item--menu-multiple { - .@{d-prefix}-demo-item__body { overflow: unset; } @@ -144,7 +129,6 @@ :root[theme-mode="dark"] { .tdesign-demo-item--menu { - .@{d-prefix}-demo-item__body { background-color: transparent; } diff --git a/style/web/components/menu/_index.less b/style/web/components/menu/_index.less index c31ffb6f13..d67e4e6133 100644 --- a/style/web/components/menu/_index.less +++ b/style/web/components/menu/_index.less @@ -22,6 +22,12 @@ a.@{prefix}-menu__item { } } +.@{prefix}-menu__logo { + & > * { + margin-left: @comp-margin-xxl; + } +} + // head-menu .@{prefix}-head-menu { .reset; @@ -134,6 +140,7 @@ a.@{prefix}-menu__item { .@{prefix}-menu__item { padding: 0 14px; justify-content: center; + .@{prefix}-menu__item-link { opacity: 0; content: ""; @@ -219,6 +226,12 @@ a.@{prefix}-menu__item { display: block; } } + + .@{prefix}-menu__log { + & > * { + margin: 0 auto; + } + } } &__inner { @@ -250,7 +263,8 @@ a.@{prefix}-menu__item { .@{prefix}-menu-group { &__title { position: relative; - padding: @comp-paddingTB-l @comp-paddingLR-l @comp-paddingTB-xs @comp-paddingLR-l; + padding: @comp-paddingTB-l @comp-paddingLR-l @comp-paddingTB-xs + @comp-paddingLR-l; color: @menu-menu-group-title-color; font-size: @menu-extra-font-size; box-sizing: border-box; @@ -401,7 +415,6 @@ a.@{prefix}-menu__item { } .@{prefix}-menu__item { - &.@{prefix}-is-active.@{prefix}-is-opened { background-color: @default-menu-active-color--dark; color: @menu-item-active-color--dark; @@ -556,7 +569,9 @@ a.@{prefix}-menu__item { color: @menu-item-active-color--light; } - &:hover:not(.@{prefix}-is-active):not(.@{prefix}-is-opened):not(.@{prefix}-is-disabled) { + &:hover:not(.@{prefix}-is-active):not(.@{prefix}-is-opened):not( + .@{prefix}-is-disabled + ) { background-color: @menu-item-hover-bg--light; } @@ -604,7 +619,9 @@ a.@{prefix}-menu__item { color: @menu-item-disabled-color-dark; } - &:hover:not(.@{prefix}-is-active):not(.@{prefix}-is-opened):not(.@{prefix}-is-disabled) { + &:hover:not(.@{prefix}-is-active):not(.@{prefix}-is-opened):not( + .@{prefix}-is-disabled + ) { background-color: @menu-item-hover-bg--dark; } @@ -740,7 +757,8 @@ a.@{prefix}-menu__item { top: 0; left: calc(100% - @pop-padding-m); - .@{prefix}-menu__item, .@{prefix}-submenu { + .@{prefix}-menu__item, + .@{prefix}-submenu { margin: @comp-margin-xxs 0 0 0; &:first-child { @@ -751,7 +769,9 @@ a.@{prefix}-menu__item { .@{prefix}-is-head-menu { .@{prefix}-menu__popup { - margin-top: calc((@menu-height-default - @head-menu-item-height) / 2) !important; + margin-top: calc( + (@menu-height-default - @head-menu-item-height) / 2 + ) !important; } }