2019-05-06 12:04:39 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 20:02:01 +08:00
|
|
|
@import '../../style/mixins/index';
|
2020-04-30 21:14:10 +08:00
|
|
|
@import './status';
|
2016-04-27 20:44:36 +08:00
|
|
|
|
2018-12-07 20:02:01 +08:00
|
|
|
@menu-prefix-cls: ~'@{ant-prefix}-menu';
|
2021-05-24 16:24:00 +08:00
|
|
|
@menu-animation-duration-normal: 0.15s;
|
|
|
|
|
|
|
|
.accessibility-focus() {
|
2022-02-11 13:06:06 +08:00
|
|
|
box-shadow: 0 0 0 2px @primary-2;
|
2021-05-24 16:24:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: Should remove icon style compatible in v5
|
2015-08-06 16:49:54 +08:00
|
|
|
|
2015-11-12 14:57:54 +08:00
|
|
|
// default theme
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{menu-prefix-cls} {
|
2020-12-22 11:08:12 +08:00
|
|
|
.reset-component();
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2015-08-06 16:49:54 +08:00
|
|
|
margin-bottom: 0;
|
|
|
|
padding-left: 0; // Override default ul/ol
|
2018-01-25 10:59:49 +08:00
|
|
|
color: @menu-item-color;
|
2020-05-11 19:12:04 +08:00
|
|
|
font-size: @menu-item-font-size;
|
2017-10-12 18:14:07 +08:00
|
|
|
line-height: 0; // Fix display inline-block gap
|
2020-05-18 17:07:33 +08:00
|
|
|
text-align: left;
|
2019-02-15 10:48:07 +08:00
|
|
|
list-style: none;
|
|
|
|
background: @menu-bg;
|
|
|
|
outline: none;
|
|
|
|
box-shadow: @box-shadow-base;
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: background @animation-duration-slow,
|
|
|
|
width @animation-duration-slow cubic-bezier(0.2, 0, 0, 1) 0s;
|
2020-12-22 11:08:12 +08:00
|
|
|
.clearfix();
|
2015-08-06 16:49:54 +08:00
|
|
|
|
2021-05-24 16:24:00 +08:00
|
|
|
&&-root:focus-visible {
|
|
|
|
.accessibility-focus();
|
|
|
|
}
|
|
|
|
|
2017-09-22 18:33:29 +08:00
|
|
|
ul,
|
|
|
|
ol {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
list-style: none;
|
2017-09-22 18:33:29 +08:00
|
|
|
}
|
|
|
|
|
2021-06-07 10:43:51 +08:00
|
|
|
// Overflow ellipsis
|
|
|
|
&-overflow {
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
&-item {
|
|
|
|
flex: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-24 16:24:00 +08:00
|
|
|
&-hidden,
|
|
|
|
&-submenu-hidden {
|
2015-11-04 23:14:49 +08:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2015-08-06 16:49:54 +08:00
|
|
|
&-item-group-title {
|
2020-03-29 10:39:46 +08:00
|
|
|
height: @menu-item-group-height;
|
2019-02-15 10:48:07 +08:00
|
|
|
padding: 8px 16px;
|
2018-01-25 10:59:49 +08:00
|
|
|
color: @menu-item-group-title-color;
|
2020-05-11 19:12:04 +08:00
|
|
|
font-size: @menu-item-group-title-font-size;
|
2020-03-29 10:39:46 +08:00
|
|
|
line-height: @menu-item-group-height;
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: all @animation-duration-slow;
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
|
|
|
|
2020-07-28 17:09:09 +08:00
|
|
|
&-horizontal &-submenu {
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: border-color @animation-duration-slow @ease-in-out,
|
|
|
|
background @animation-duration-slow @ease-in-out;
|
2020-07-28 17:09:09 +08:00
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2016-03-22 20:43:57 +08:00
|
|
|
&-submenu,
|
2017-11-29 21:00:16 +08:00
|
|
|
&-submenu-inline {
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: border-color @animation-duration-slow @ease-in-out,
|
|
|
|
background @animation-duration-slow @ease-in-out,
|
|
|
|
padding @menu-animation-duration-normal @ease-in-out;
|
2017-07-27 19:43:45 +08:00
|
|
|
}
|
2015-08-14 18:16:41 +08:00
|
|
|
|
2019-06-11 12:00:52 +08:00
|
|
|
&-submenu-selected {
|
|
|
|
color: @menu-highlight-color;
|
|
|
|
}
|
|
|
|
|
2017-02-16 15:35:52 +08:00
|
|
|
&-item:active,
|
|
|
|
&-submenu-title:active {
|
2018-01-25 10:59:49 +08:00
|
|
|
background: @menu-item-active-bg;
|
2017-02-16 15:35:52 +08:00
|
|
|
}
|
|
|
|
|
2016-03-22 20:43:57 +08:00
|
|
|
&-submenu &-sub {
|
|
|
|
cursor: initial;
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: background @animation-duration-slow @ease-in-out,
|
|
|
|
padding @animation-duration-slow @ease-in-out;
|
2016-03-22 20:43:57 +08:00
|
|
|
}
|
|
|
|
|
2021-06-29 19:04:37 +08:00
|
|
|
&-title-content {
|
|
|
|
transition: color @animation-duration-slow;
|
|
|
|
}
|
|
|
|
|
2020-05-03 11:28:15 +08:00
|
|
|
&-item a {
|
2018-01-25 10:59:49 +08:00
|
|
|
color: @menu-item-color;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2016-01-14 11:54:46 +08:00
|
|
|
&:hover {
|
2018-01-25 10:59:49 +08:00
|
|
|
color: @menu-highlight-color;
|
2016-01-14 11:54:46 +08:00
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
&::before {
|
2016-06-25 15:09:23 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
background-color: transparent;
|
2018-12-07 20:02:01 +08:00
|
|
|
content: '';
|
2016-06-25 15:09:23 +08:00
|
|
|
}
|
2016-01-14 11:54:46 +08:00
|
|
|
}
|
|
|
|
|
2019-11-19 20:30:44 +08:00
|
|
|
// https://github.com/ant-design/ant-design/issues/19809
|
2020-05-03 11:28:15 +08:00
|
|
|
&-item > .@{ant-prefix}-badge a {
|
2019-11-19 20:30:44 +08:00
|
|
|
color: @menu-item-color;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2019-11-19 20:30:44 +08:00
|
|
|
&:hover {
|
|
|
|
color: @menu-highlight-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-15 14:12:25 +08:00
|
|
|
&-item-divider {
|
|
|
|
overflow: hidden;
|
|
|
|
line-height: 0;
|
2021-07-19 15:42:07 +08:00
|
|
|
border-color: @border-color-split;
|
|
|
|
border-style: solid;
|
|
|
|
border-width: 1px 0 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-item-divider-dashed {
|
|
|
|
border-style: dashed;
|
2016-11-15 14:12:25 +08:00
|
|
|
}
|
|
|
|
|
2015-11-14 20:41:10 +08:00
|
|
|
&-horizontal &-item,
|
|
|
|
&-horizontal &-submenu {
|
|
|
|
margin-top: -1px;
|
|
|
|
}
|
|
|
|
|
2016-06-25 15:09:23 +08:00
|
|
|
&-horizontal > &-item:hover,
|
2015-11-14 16:37:42 +08:00
|
|
|
&-horizontal > &-item-active,
|
|
|
|
&-horizontal > &-submenu &-submenu-title:hover {
|
|
|
|
background-color: transparent;
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
|
|
|
|
2015-11-14 16:37:42 +08:00
|
|
|
&-item-selected {
|
2018-01-25 10:59:49 +08:00
|
|
|
color: @menu-highlight-color;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2020-05-03 11:28:15 +08:00
|
|
|
a,
|
|
|
|
a:hover {
|
2018-01-25 10:59:49 +08:00
|
|
|
color: @menu-highlight-color;
|
2016-04-13 14:46:08 +08:00
|
|
|
}
|
2015-11-14 16:37:42 +08:00
|
|
|
}
|
2015-11-05 19:26:53 +08:00
|
|
|
|
2016-12-04 19:26:11 +08:00
|
|
|
&:not(&-horizontal) &-item-selected {
|
2018-01-25 10:59:49 +08:00
|
|
|
background-color: @menu-item-active-bg;
|
2016-12-04 19:26:11 +08:00
|
|
|
}
|
|
|
|
|
2017-11-11 00:07:03 +08:00
|
|
|
&-inline,
|
|
|
|
&-vertical,
|
|
|
|
&-vertical-left {
|
|
|
|
border-right: @border-width-base @border-style-base @border-color-split;
|
|
|
|
}
|
2020-01-02 19:10:16 +08:00
|
|
|
|
2017-11-11 00:07:03 +08:00
|
|
|
&-vertical-right {
|
|
|
|
border-left: @border-width-base @border-style-base @border-color-split;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-vertical&-sub,
|
|
|
|
&-vertical-left&-sub,
|
|
|
|
&-vertical-right&-sub {
|
2019-02-25 14:16:46 +08:00
|
|
|
min-width: 160px;
|
2020-03-16 14:16:39 +08:00
|
|
|
max-height: calc(100vh - 100px);
|
2017-11-29 21:00:16 +08:00
|
|
|
padding: 0;
|
2020-03-16 14:16:39 +08:00
|
|
|
overflow: hidden;
|
2019-02-15 10:48:07 +08:00
|
|
|
border-right: 0;
|
2019-02-25 14:16:46 +08:00
|
|
|
|
2020-03-16 14:16:39 +08:00
|
|
|
// https://github.com/ant-design/ant-design/issues/22244
|
2020-09-18 19:44:56 +08:00
|
|
|
// https://github.com/ant-design/ant-design/issues/26812
|
|
|
|
&:not([class*='-active']) {
|
2020-03-16 14:16:39 +08:00
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
|
2016-04-27 15:25:57 +08:00
|
|
|
.@{menu-prefix-cls}-item {
|
2017-02-16 17:31:08 +08:00
|
|
|
left: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-left: 0;
|
|
|
|
border-right: 0;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
&::after {
|
2017-04-02 14:43:34 +08:00
|
|
|
border-right: 0;
|
|
|
|
}
|
2017-02-16 17:31:08 +08:00
|
|
|
}
|
2017-11-29 21:00:16 +08:00
|
|
|
> .@{menu-prefix-cls}-item,
|
|
|
|
> .@{menu-prefix-cls}-submenu {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
}
|
2016-04-27 15:25:57 +08:00
|
|
|
}
|
|
|
|
|
2019-02-25 14:16:46 +08:00
|
|
|
&-horizontal&-sub {
|
|
|
|
min-width: 114px; // in case of submenu width is too big: https://codesandbox.io/s/qvpwm6mk66
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
|
|
|
|
2020-07-28 17:09:09 +08:00
|
|
|
&-horizontal &-item,
|
|
|
|
&-horizontal &-submenu-title {
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: border-color @animation-duration-slow, background @animation-duration-slow;
|
2020-07-28 17:09:09 +08:00
|
|
|
}
|
2020-11-06 15:25:43 +08:00
|
|
|
|
2015-11-14 17:51:09 +08:00
|
|
|
&-item,
|
|
|
|
&-submenu-title {
|
2015-08-06 16:49:54 +08:00
|
|
|
position: relative;
|
|
|
|
display: block;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin: 0;
|
2020-04-28 11:16:01 +08:00
|
|
|
padding: @menu-item-padding;
|
2015-08-06 16:49:54 +08:00
|
|
|
white-space: nowrap;
|
2019-02-15 10:48:07 +08:00
|
|
|
cursor: pointer;
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: border-color @animation-duration-slow, background @animation-duration-slow,
|
|
|
|
padding @animation-duration-slow @ease-in-out;
|
2020-11-25 14:31:51 +08:00
|
|
|
|
|
|
|
.@{menu-prefix-cls}-item-icon,
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
2016-05-16 14:35:24 +08:00
|
|
|
min-width: 14px;
|
2019-11-04 16:47:26 +08:00
|
|
|
font-size: @menu-icon-size;
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: font-size @menu-animation-duration-normal @ease-out,
|
|
|
|
margin @animation-duration-slow @ease-in-out, color @animation-duration-slow;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2017-06-30 21:07:01 +08:00
|
|
|
+ span {
|
2021-05-24 16:24:00 +08:00
|
|
|
margin-left: @menu-icon-margin-right;
|
2017-07-25 10:30:36 +08:00
|
|
|
opacity: 1;
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: opacity @animation-duration-slow @ease-in-out, margin @animation-duration-slow,
|
|
|
|
color @animation-duration-slow;
|
2017-06-30 21:07:01 +08:00
|
|
|
}
|
2016-05-07 16:03:51 +08:00
|
|
|
}
|
2020-03-06 11:53:09 +08:00
|
|
|
|
2021-05-24 19:13:23 +08:00
|
|
|
.@{menu-prefix-cls}-item-icon.svg {
|
|
|
|
vertical-align: -0.125em;
|
|
|
|
}
|
|
|
|
|
2020-03-06 11:53:09 +08:00
|
|
|
&.@{menu-prefix-cls}-item-only-child {
|
2020-11-25 14:31:51 +08:00
|
|
|
> .@{iconfont-css-prefix},
|
|
|
|
> .@{menu-prefix-cls}-item-icon {
|
2020-03-06 11:53:09 +08:00
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
2021-05-24 16:24:00 +08:00
|
|
|
|
|
|
|
&:focus-visible {
|
|
|
|
.accessibility-focus();
|
|
|
|
}
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
2016-04-05 17:42:32 +08:00
|
|
|
|
2015-08-06 16:49:54 +08:00
|
|
|
& > &-item-divider {
|
|
|
|
margin: 1px 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-submenu {
|
2017-11-11 00:07:03 +08:00
|
|
|
&-popup {
|
|
|
|
position: absolute;
|
2017-11-20 14:58:03 +08:00
|
|
|
z-index: @zindex-dropdown;
|
2020-11-09 10:13:06 +08:00
|
|
|
background: transparent;
|
2019-02-15 10:48:07 +08:00
|
|
|
border-radius: @border-radius-base;
|
2020-04-27 16:39:41 +08:00
|
|
|
box-shadow: none;
|
2020-11-11 19:05:01 +08:00
|
|
|
transform-origin: 0 0;
|
2018-08-22 00:49:53 +08:00
|
|
|
|
2020-04-23 11:17:21 +08:00
|
|
|
// https://github.com/ant-design/ant-design/issues/13955
|
2019-02-15 10:48:07 +08:00
|
|
|
&::before {
|
2018-08-22 00:49:53 +08:00
|
|
|
position: absolute;
|
|
|
|
top: -7px;
|
2018-09-10 11:39:03 +08:00
|
|
|
right: 0;
|
2018-08-22 00:49:53 +08:00
|
|
|
bottom: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
left: 0;
|
2020-06-07 20:57:43 +08:00
|
|
|
z-index: -1;
|
2020-04-23 11:17:21 +08:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2018-12-07 20:02:01 +08:00
|
|
|
opacity: 0.0001;
|
2019-02-15 10:48:07 +08:00
|
|
|
content: ' ';
|
2018-08-22 00:49:53 +08:00
|
|
|
}
|
2017-11-11 00:07:03 +08:00
|
|
|
}
|
2015-08-06 16:49:54 +08:00
|
|
|
|
2020-04-23 11:17:21 +08:00
|
|
|
// https://github.com/ant-design/ant-design/issues/13955
|
|
|
|
&-placement-rightTop::before {
|
|
|
|
top: 0;
|
|
|
|
left: -7px;
|
|
|
|
}
|
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
> .@{menu-prefix-cls} {
|
2019-12-26 14:06:32 +08:00
|
|
|
background-color: @menu-bg;
|
2017-03-25 20:31:24 +08:00
|
|
|
border-radius: @border-radius-base;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
&-submenu-title::after {
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: transform @animation-duration-slow @ease-in-out;
|
2017-07-27 19:43:45 +08:00
|
|
|
}
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
|
|
|
|
2019-12-26 14:06:32 +08:00
|
|
|
&-popup > .@{menu-prefix-cls} {
|
|
|
|
background-color: @menu-popup-bg;
|
|
|
|
}
|
|
|
|
|
2020-11-06 15:25:43 +08:00
|
|
|
&-expand-icon,
|
|
|
|
&-arrow {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
right: 16px;
|
|
|
|
width: 10px;
|
|
|
|
color: @menu-item-color;
|
|
|
|
transform: translateY(-50%);
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: transform @animation-duration-slow @ease-in-out;
|
2020-11-06 15:25:43 +08:00
|
|
|
}
|
2020-01-02 19:10:16 +08:00
|
|
|
|
2020-11-06 15:25:43 +08:00
|
|
|
&-arrow {
|
2021-05-24 16:24:00 +08:00
|
|
|
// →
|
2020-11-06 15:25:43 +08:00
|
|
|
&::before,
|
|
|
|
&::after {
|
2017-09-12 16:46:33 +08:00
|
|
|
position: absolute;
|
2020-11-06 15:25:43 +08:00
|
|
|
width: 6px;
|
|
|
|
height: 1.5px;
|
2022-01-24 11:26:26 +08:00
|
|
|
background-color: currentcolor;
|
2020-11-06 15:25:43 +08:00
|
|
|
border-radius: 2px;
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: background @animation-duration-slow @ease-in-out,
|
|
|
|
transform @animation-duration-slow @ease-in-out, top @animation-duration-slow @ease-in-out,
|
|
|
|
color @animation-duration-slow @ease-in-out;
|
2020-11-06 15:25:43 +08:00
|
|
|
content: '';
|
2017-09-12 16:46:33 +08:00
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2020-11-06 15:25:43 +08:00
|
|
|
&::before {
|
|
|
|
transform: rotate(45deg) translateY(-2.5px);
|
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2020-11-06 15:25:43 +08:00
|
|
|
&::after {
|
|
|
|
transform: rotate(-45deg) translateY(2.5px);
|
2017-09-12 16:46:33 +08:00
|
|
|
}
|
2015-08-13 17:31:09 +08:00
|
|
|
}
|
|
|
|
|
2020-11-08 15:29:37 +08:00
|
|
|
&:hover > &-title > &-expand-icon,
|
|
|
|
&:hover > &-title > &-arrow {
|
2020-11-06 15:25:43 +08:00
|
|
|
color: @menu-highlight-color;
|
2020-01-02 19:10:16 +08:00
|
|
|
}
|
|
|
|
|
2021-05-24 16:24:00 +08:00
|
|
|
.@{menu-prefix-cls}-inline-collapsed &-arrow,
|
2020-11-06 15:25:43 +08:00
|
|
|
&-inline &-arrow {
|
2021-05-24 16:24:00 +08:00
|
|
|
// ↓
|
2019-02-15 10:48:07 +08:00
|
|
|
&::before {
|
2020-11-06 15:25:43 +08:00
|
|
|
transform: rotate(-45deg) translateX(2.5px);
|
2017-11-29 21:00:16 +08:00
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
&::after {
|
2020-11-06 15:25:43 +08:00
|
|
|
transform: rotate(45deg) translateX(-2.5px);
|
2017-11-29 21:00:16 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-06 15:25:43 +08:00
|
|
|
&-horizontal &-arrow {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2020-11-08 15:29:37 +08:00
|
|
|
&-open&-inline > &-title > &-arrow {
|
2021-05-24 16:24:00 +08:00
|
|
|
// ↑
|
2020-11-06 15:25:43 +08:00
|
|
|
transform: translateY(-2px);
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2020-11-06 15:25:43 +08:00
|
|
|
&::after {
|
|
|
|
transform: rotate(-45deg) translateX(-2.5px);
|
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2020-11-06 15:25:43 +08:00
|
|
|
&::before {
|
|
|
|
transform: rotate(45deg) translateX(2.5px);
|
2015-08-13 17:31:09 +08:00
|
|
|
}
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
2016-07-24 14:23:41 +08:00
|
|
|
}
|
2016-07-22 18:41:59 +08:00
|
|
|
|
2017-11-11 00:07:03 +08:00
|
|
|
&-vertical &-submenu-selected,
|
|
|
|
&-vertical-left &-submenu-selected,
|
|
|
|
&-vertical-right &-submenu-selected {
|
2018-01-25 10:59:49 +08:00
|
|
|
color: @menu-highlight-color;
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-horizontal {
|
2020-04-28 11:16:01 +08:00
|
|
|
line-height: @menu-horizontal-line-height;
|
2015-11-26 19:32:55 +08:00
|
|
|
border: 0;
|
2017-01-31 16:05:10 +08:00
|
|
|
border-bottom: @border-width-base @border-style-base @border-color-split;
|
2015-08-06 16:49:54 +08:00
|
|
|
box-shadow: none;
|
|
|
|
|
2020-07-28 17:09:09 +08:00
|
|
|
&:not(.@{menu-prefix-cls}-dark) {
|
|
|
|
> .@{menu-prefix-cls}-item,
|
|
|
|
> .@{menu-prefix-cls}-submenu {
|
|
|
|
margin-top: -1px;
|
|
|
|
margin-bottom: 0;
|
|
|
|
padding: @menu-item-padding;
|
2020-08-07 11:14:27 +08:00
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&-active,
|
|
|
|
&-open,
|
|
|
|
&-selected {
|
|
|
|
color: @menu-highlight-color;
|
2021-05-25 17:24:18 +08:00
|
|
|
|
|
|
|
&::after {
|
|
|
|
border-bottom: 2px solid @menu-highlight-color;
|
|
|
|
}
|
2020-08-07 11:14:27 +08:00
|
|
|
}
|
2020-07-28 17:09:09 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-14 17:29:48 +08:00
|
|
|
> .@{menu-prefix-cls}-item,
|
|
|
|
> .@{menu-prefix-cls}-submenu {
|
2015-08-14 18:16:41 +08:00
|
|
|
position: relative;
|
|
|
|
top: 1px;
|
2018-08-30 11:32:40 +08:00
|
|
|
display: inline-block;
|
2018-09-03 14:35:44 +08:00
|
|
|
vertical-align: bottom;
|
2021-05-25 17:24:18 +08:00
|
|
|
|
|
|
|
&::after {
|
|
|
|
position: absolute;
|
|
|
|
right: @menu-item-padding-horizontal;
|
|
|
|
bottom: 0;
|
|
|
|
left: @menu-item-padding-horizontal;
|
|
|
|
border-bottom: 2px solid transparent;
|
|
|
|
transition: border-color @animation-duration-slow @ease-in-out;
|
|
|
|
content: '';
|
|
|
|
}
|
2018-04-23 00:31:36 +08:00
|
|
|
}
|
2015-11-14 17:29:48 +08:00
|
|
|
|
2020-07-24 14:39:47 +08:00
|
|
|
> .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
2018-05-17 21:17:20 +08:00
|
|
|
> .@{menu-prefix-cls}-item {
|
2020-05-03 11:28:15 +08:00
|
|
|
a {
|
2018-05-17 21:17:20 +08:00
|
|
|
color: @menu-item-color;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2018-05-17 21:17:20 +08:00
|
|
|
&:hover {
|
|
|
|
color: @menu-highlight-color;
|
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
&::before {
|
2018-05-17 21:17:20 +08:00
|
|
|
bottom: -2px;
|
|
|
|
}
|
2018-04-23 00:31:36 +08:00
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2020-05-03 11:28:15 +08:00
|
|
|
&-selected a {
|
2018-05-17 21:17:20 +08:00
|
|
|
color: @menu-highlight-color;
|
2015-08-17 17:28:48 +08:00
|
|
|
}
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
&::after {
|
2015-08-06 16:49:54 +08:00
|
|
|
display: block;
|
|
|
|
clear: both;
|
2019-02-15 10:48:07 +08:00
|
|
|
height: 0;
|
|
|
|
content: '\20';
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-26 19:32:55 +08:00
|
|
|
&-vertical,
|
2017-11-11 00:07:03 +08:00
|
|
|
&-vertical-left,
|
|
|
|
&-vertical-right,
|
2017-02-16 21:24:17 +08:00
|
|
|
&-inline {
|
2017-11-29 21:00:16 +08:00
|
|
|
.@{menu-prefix-cls}-item {
|
|
|
|
position: relative;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
&::after {
|
2017-11-29 21:00:16 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
right: 0;
|
2017-11-29 21:00:16 +08:00
|
|
|
bottom: 0;
|
2018-08-29 11:20:13 +08:00
|
|
|
border-right: @menu-item-active-border-width solid @menu-highlight-color;
|
2018-12-07 20:02:01 +08:00
|
|
|
transform: scaleY(0.0001);
|
2017-11-29 21:00:16 +08:00
|
|
|
opacity: 0;
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: transform @menu-animation-duration-normal @ease-out,
|
|
|
|
opacity @menu-animation-duration-normal @ease-out;
|
2019-02-15 10:48:07 +08:00
|
|
|
content: '';
|
2017-11-29 21:00:16 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-16 21:24:17 +08:00
|
|
|
.@{menu-prefix-cls}-item,
|
|
|
|
.@{menu-prefix-cls}-submenu-title {
|
2017-10-11 12:01:27 +08:00
|
|
|
height: @menu-item-height;
|
2019-08-02 22:51:34 +08:00
|
|
|
margin-top: @menu-item-vertical-margin;
|
|
|
|
margin-bottom: @menu-item-vertical-margin;
|
2019-02-15 10:48:07 +08:00
|
|
|
padding: 0 16px;
|
2016-11-10 11:35:12 +08:00
|
|
|
overflow: hidden;
|
2019-02-15 10:48:07 +08:00
|
|
|
line-height: @menu-item-height;
|
2016-11-10 11:35:12 +08:00
|
|
|
text-overflow: ellipsis;
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
2017-10-11 12:01:27 +08:00
|
|
|
|
2017-11-20 14:37:14 +08:00
|
|
|
// disable margin collapsed
|
|
|
|
.@{menu-prefix-cls}-submenu {
|
2019-10-30 13:15:50 +08:00
|
|
|
padding-bottom: 0.02px;
|
2017-11-20 14:37:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.@{menu-prefix-cls}-item:not(:last-child) {
|
2019-08-02 22:51:34 +08:00
|
|
|
margin-bottom: @menu-item-boundary-margin;
|
2017-11-20 14:37:14 +08:00
|
|
|
}
|
|
|
|
|
2017-10-11 12:01:27 +08:00
|
|
|
> .@{menu-prefix-cls}-item,
|
|
|
|
> .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
|
|
|
|
height: @menu-inline-toplevel-item-height;
|
2019-02-15 10:48:07 +08:00
|
|
|
line-height: @menu-inline-toplevel-item-height;
|
2017-10-11 12:01:27 +08:00
|
|
|
}
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
2015-08-10 17:57:28 +08:00
|
|
|
|
2020-04-08 16:18:18 +08:00
|
|
|
&-vertical {
|
2021-04-21 13:14:03 +08:00
|
|
|
.@{menu-prefix-cls}-item-group-list .@{menu-prefix-cls}-submenu-title,
|
2020-04-08 16:18:18 +08:00
|
|
|
.@{menu-prefix-cls}-submenu-title {
|
|
|
|
padding-right: 34px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-26 13:38:18 +08:00
|
|
|
&-inline {
|
|
|
|
width: 100%;
|
|
|
|
.@{menu-prefix-cls}-selected,
|
|
|
|
.@{menu-prefix-cls}-item-selected {
|
2019-02-15 10:48:07 +08:00
|
|
|
&::after {
|
2017-10-26 13:38:18 +08:00
|
|
|
transform: scaleY(1);
|
2019-02-15 10:48:07 +08:00
|
|
|
opacity: 1;
|
2021-05-24 16:24:00 +08:00
|
|
|
transition: transform @menu-animation-duration-normal @ease-in-out,
|
|
|
|
opacity @menu-animation-duration-normal @ease-in-out;
|
2017-10-26 13:38:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{menu-prefix-cls}-item,
|
|
|
|
.@{menu-prefix-cls}-submenu-title {
|
2018-12-07 20:02:01 +08:00
|
|
|
width: ~'calc(100% + 1px)';
|
2017-10-26 13:38:18 +08:00
|
|
|
}
|
2018-01-23 21:00:11 +08:00
|
|
|
|
2021-04-21 13:14:03 +08:00
|
|
|
.@{menu-prefix-cls}-item-group-list .@{menu-prefix-cls}-submenu-title,
|
2018-01-23 21:00:11 +08:00
|
|
|
.@{menu-prefix-cls}-submenu-title {
|
|
|
|
padding-right: 34px;
|
|
|
|
}
|
2017-10-26 13:38:18 +08:00
|
|
|
|
2021-05-24 16:24:00 +08:00
|
|
|
// Motion enhance for first level
|
|
|
|
&.@{menu-prefix-cls}-root {
|
|
|
|
.@{menu-prefix-cls}-item,
|
|
|
|
.@{menu-prefix-cls}-submenu-title {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
transition: border-color @animation-duration-slow, background @animation-duration-slow,
|
|
|
|
padding 0.1s @ease-out;
|
|
|
|
|
|
|
|
> .@{menu-prefix-cls}-title-content {
|
|
|
|
flex: auto;
|
|
|
|
min-width: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
|
|
|
|
> * {
|
|
|
|
flex: none;
|
|
|
|
}
|
|
|
|
}
|
2021-04-30 15:15:40 +08:00
|
|
|
}
|
2021-05-24 16:24:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&&-inline-collapsed {
|
|
|
|
width: @menu-collapsed-width;
|
|
|
|
|
2017-08-22 18:37:08 +08:00
|
|
|
> .@{menu-prefix-cls}-item,
|
2018-12-07 20:02:01 +08:00
|
|
|
> .@{menu-prefix-cls}-item-group
|
|
|
|
> .@{menu-prefix-cls}-item-group-list
|
|
|
|
> .@{menu-prefix-cls}-item,
|
|
|
|
> .@{menu-prefix-cls}-item-group
|
|
|
|
> .@{menu-prefix-cls}-item-group-list
|
|
|
|
> .@{menu-prefix-cls}-submenu
|
|
|
|
> .@{menu-prefix-cls}-submenu-title,
|
2017-08-22 18:37:08 +08:00
|
|
|
> .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
|
|
|
|
left: 0;
|
2020-10-15 10:42:15 +08:00
|
|
|
padding: 0 ~'calc(50% - @{menu-icon-size-lg} / 2)';
|
2019-02-15 10:48:07 +08:00
|
|
|
text-overflow: clip;
|
2021-05-24 16:24:00 +08:00
|
|
|
|
2017-09-12 16:46:33 +08:00
|
|
|
.@{menu-prefix-cls}-submenu-arrow {
|
2021-05-24 16:24:00 +08:00
|
|
|
opacity: 0;
|
2017-08-22 18:37:08 +08:00
|
|
|
}
|
2020-11-25 14:31:51 +08:00
|
|
|
|
|
|
|
.@{menu-prefix-cls}-item-icon,
|
2017-08-22 18:37:08 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
2019-02-15 10:48:07 +08:00
|
|
|
margin: 0;
|
2019-11-04 16:47:26 +08:00
|
|
|
font-size: @menu-icon-size-lg;
|
2017-10-11 12:01:27 +08:00
|
|
|
line-height: @menu-item-height;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2017-08-22 18:37:08 +08:00
|
|
|
+ span {
|
|
|
|
display: inline-block;
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-13 12:21:24 +08:00
|
|
|
|
2020-11-25 14:31:51 +08:00
|
|
|
.@{menu-prefix-cls}-item-icon,
|
2020-03-13 12:21:24 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
2017-08-22 18:37:08 +08:00
|
|
|
&-tooltip {
|
|
|
|
pointer-events: none;
|
2020-11-25 14:31:51 +08:00
|
|
|
|
|
|
|
.@{menu-prefix-cls}-item-icon,
|
2017-08-22 18:37:08 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
|
|
|
display: none;
|
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2017-08-22 18:37:08 +08:00
|
|
|
a {
|
|
|
|
color: @text-color-dark;
|
|
|
|
}
|
|
|
|
}
|
2017-09-15 20:36:40 +08:00
|
|
|
|
|
|
|
.@{menu-prefix-cls}-item-group-title {
|
2019-02-15 10:48:07 +08:00
|
|
|
padding-right: 4px;
|
|
|
|
padding-left: 4px;
|
2017-09-15 20:36:40 +08:00
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
2017-08-22 18:37:08 +08:00
|
|
|
}
|
|
|
|
|
2017-02-16 17:56:15 +08:00
|
|
|
&-item-group-list {
|
2017-11-29 21:00:16 +08:00
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2017-02-16 21:24:17 +08:00
|
|
|
.@{menu-prefix-cls}-item,
|
|
|
|
.@{menu-prefix-cls}-submenu-title {
|
2017-02-16 17:56:15 +08:00
|
|
|
padding: 0 16px 0 28px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-14 18:16:41 +08:00
|
|
|
&-root&-vertical,
|
2017-11-11 00:07:03 +08:00
|
|
|
&-root&-vertical-left,
|
|
|
|
&-root&-vertical-right,
|
2015-08-13 17:31:09 +08:00
|
|
|
&-root&-inline {
|
2015-08-14 18:16:41 +08:00
|
|
|
box-shadow: none;
|
2015-08-13 17:31:09 +08:00
|
|
|
}
|
|
|
|
|
2020-05-27 22:19:07 +08:00
|
|
|
&-root&-inline-collapsed {
|
|
|
|
.@{menu-prefix-cls}-item,
|
|
|
|
.@{menu-prefix-cls}-submenu .@{menu-prefix-cls}-submenu-title {
|
|
|
|
> .@{menu-prefix-cls}-inline-collapsed-noicon {
|
|
|
|
font-size: @menu-icon-size-lg;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-10 17:57:28 +08:00
|
|
|
&-sub&-inline {
|
|
|
|
padding: 0;
|
2021-01-15 17:29:33 +08:00
|
|
|
background: @menu-inline-submenu-bg;
|
2015-11-26 19:32:55 +08:00
|
|
|
border: 0;
|
2015-11-14 16:37:42 +08:00
|
|
|
border-radius: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
box-shadow: none;
|
2015-11-26 19:32:55 +08:00
|
|
|
& > .@{menu-prefix-cls}-item,
|
|
|
|
& > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
|
2017-10-11 12:01:27 +08:00
|
|
|
height: @menu-item-height;
|
2019-02-15 10:48:07 +08:00
|
|
|
line-height: @menu-item-height;
|
2015-08-14 18:16:41 +08:00
|
|
|
list-style-position: inside;
|
2019-02-15 10:48:07 +08:00
|
|
|
list-style-type: disc;
|
2015-08-10 17:57:28 +08:00
|
|
|
}
|
2015-12-11 16:55:30 +08:00
|
|
|
|
|
|
|
& .@{menu-prefix-cls}-item-group-title {
|
|
|
|
padding-left: 32px;
|
|
|
|
}
|
2015-08-10 17:57:28 +08:00
|
|
|
}
|
2017-01-06 11:36:54 +08:00
|
|
|
|
|
|
|
// Disabled state sets text to gray and nukes hover/tab effects
|
|
|
|
&-item-disabled,
|
|
|
|
&-submenu-disabled {
|
|
|
|
color: @disabled-color !important;
|
|
|
|
background: none;
|
2019-02-15 10:48:07 +08:00
|
|
|
cursor: not-allowed;
|
2021-05-25 17:24:18 +08:00
|
|
|
|
|
|
|
&::after {
|
|
|
|
border-color: transparent !important;
|
|
|
|
}
|
|
|
|
|
2020-05-03 11:28:15 +08:00
|
|
|
a {
|
2017-01-06 11:36:54 +08:00
|
|
|
color: @disabled-color !important;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2017-05-15 18:23:49 +08:00
|
|
|
> .@{menu-prefix-cls}-submenu-title {
|
|
|
|
color: @disabled-color !important;
|
|
|
|
cursor: not-allowed;
|
2018-04-18 13:47:40 +08:00
|
|
|
> .@{menu-prefix-cls}-submenu-arrow {
|
2019-02-15 10:48:07 +08:00
|
|
|
&::before,
|
|
|
|
&::after {
|
2018-04-18 13:47:40 +08:00
|
|
|
background: @disabled-color !important;
|
|
|
|
}
|
|
|
|
}
|
2017-05-15 18:23:49 +08:00
|
|
|
}
|
2017-01-06 11:36:54 +08:00
|
|
|
}
|
2015-08-06 16:49:54 +08:00
|
|
|
}
|
2017-11-29 21:08:44 +08:00
|
|
|
|
2020-03-17 20:26:53 +08:00
|
|
|
// Integration with header element so menu items have the same height
|
|
|
|
.@{ant-prefix}-layout-header {
|
|
|
|
.@{menu-prefix-cls} {
|
|
|
|
line-height: inherit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-20 18:41:57 +08:00
|
|
|
// https://github.com/ant-design/ant-design/issues/32950
|
|
|
|
.@{ant-prefix}-menu-inline-collapsed-tooltip {
|
|
|
|
a,
|
|
|
|
a:hover {
|
|
|
|
color: @white;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-08 16:15:55 +08:00
|
|
|
@import './light';
|
2017-11-29 21:08:44 +08:00
|
|
|
@import './dark';
|
2020-03-19 12:13:24 +08:00
|
|
|
@import './rtl';
|