2016-12-07 20:45:21 +08:00
|
|
|
@menu-prefix-cls: ~"@{css-prefix}menu";
|
|
|
|
@menu-dropdown-item-prefix-cls: ~"@{menu-prefix-cls}-horizontal .@{menu-prefix-cls}-submenu .@{select-dropdown-prefix-cls} .@{menu-prefix-cls}-item";
|
|
|
|
|
|
|
|
.@{menu-prefix-cls} {
|
|
|
|
display: block;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
outline: none;
|
|
|
|
list-style: none;
|
|
|
|
color: @text-color;
|
|
|
|
font-size: @font-size-base;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
&-horizontal{
|
|
|
|
height: 60px;
|
|
|
|
line-height: 60px;
|
|
|
|
|
|
|
|
&.@{menu-prefix-cls}-light{
|
|
|
|
&:after{
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
height: 1px;
|
|
|
|
background: @border-color-base;
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&-vertical{
|
|
|
|
&.@{menu-prefix-cls}-light{
|
|
|
|
&:after{
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
width: 1px;
|
|
|
|
height: 100%;
|
|
|
|
background: @border-color-base;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
right: 0;
|
2016-12-08 11:55:38 +08:00
|
|
|
z-index: 1;
|
2016-12-07 20:45:21 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-light{
|
|
|
|
background: #fff;
|
|
|
|
}
|
|
|
|
&-dark{
|
|
|
|
background: @title-color;
|
|
|
|
}
|
|
|
|
&-primary{
|
|
|
|
background: @primary-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-item{
|
|
|
|
display: block;
|
|
|
|
outline: none;
|
|
|
|
list-style: none;
|
|
|
|
font-size: @font-size-base;
|
|
|
|
position: relative;
|
|
|
|
z-index: 1;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: all @transition-time @ease-in-out;
|
|
|
|
}
|
2016-12-08 11:55:38 +08:00
|
|
|
&-item > i{
|
|
|
|
margin-right: 6px;
|
|
|
|
}
|
|
|
|
&-submenu-title > i, &-submenu-title span > i{
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
|
2016-12-07 20:45:21 +08:00
|
|
|
&-horizontal &-item,
|
|
|
|
&-horizontal &-submenu
|
|
|
|
{
|
|
|
|
float: left;
|
|
|
|
padding: 0 20px;
|
|
|
|
position: relative;
|
|
|
|
cursor: pointer;
|
2016-12-08 11:55:38 +08:00
|
|
|
z-index: 3;
|
2016-12-07 20:45:21 +08:00
|
|
|
transition: all @transition-time @ease-in-out;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-light&-horizontal &-item, &-light&-horizontal &-submenu{
|
|
|
|
height: inherit;
|
|
|
|
line-height: inherit;
|
|
|
|
border-bottom: 2px solid transparent;
|
2016-12-08 11:55:38 +08:00
|
|
|
color: @text-color;
|
2016-12-07 20:45:21 +08:00
|
|
|
&-active, &:hover{
|
|
|
|
color: @primary-color;
|
|
|
|
border-bottom: 2px solid @primary-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-12-08 11:55:38 +08:00
|
|
|
&-dark&-horizontal &-item, &-dark&-horizontal &-submenu{
|
|
|
|
color: @subsidiary-color;
|
2016-12-07 20:45:21 +08:00
|
|
|
&-active, &:hover{
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-12-08 11:55:38 +08:00
|
|
|
&-primary&-horizontal &-item, &-primary&-horizontal &-submenu{
|
|
|
|
color: #fff;
|
2016-12-07 20:45:21 +08:00
|
|
|
&-active, &:hover{
|
|
|
|
background: @link-active-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-horizontal &-submenu .@{select-dropdown-prefix-cls} {
|
|
|
|
width: 100%;
|
|
|
|
.@{menu-prefix-cls}-item{
|
|
|
|
height: auto;
|
|
|
|
line-height: normal;
|
|
|
|
border-bottom: 0;
|
|
|
|
float: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-item-group{
|
|
|
|
line-height: normal;
|
|
|
|
&-title {
|
|
|
|
padding-left: 8px;
|
2016-12-08 11:55:38 +08:00
|
|
|
font-size: @font-size-small;
|
2016-12-07 20:45:21 +08:00
|
|
|
color: @legend-color;
|
2016-12-08 18:33:04 +08:00
|
|
|
height: 48px;
|
|
|
|
line-height: 48px;
|
|
|
|
}
|
|
|
|
|
|
|
|
& > ul{
|
|
|
|
padding: 0 !important;
|
|
|
|
list-style: none !important;
|
2016-12-07 20:45:21 +08:00
|
|
|
}
|
|
|
|
}
|
2016-12-08 11:55:38 +08:00
|
|
|
|
|
|
|
// vertical
|
|
|
|
&-vertical &-item,
|
|
|
|
&-vertical &-submenu-title
|
|
|
|
{
|
|
|
|
padding: 14px 24px;
|
|
|
|
position: relative;
|
|
|
|
cursor: pointer;
|
|
|
|
z-index: 1;
|
|
|
|
transition: all @transition-time @ease-in-out;
|
|
|
|
|
|
|
|
&:hover{
|
|
|
|
background: @background-color-select-hover;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-vertical &-submenu-title-icon{
|
|
|
|
float: right;
|
|
|
|
position: relative;
|
|
|
|
top: 4px;
|
|
|
|
}
|
|
|
|
&-submenu-title-icon {
|
|
|
|
transition: transform @transition-time @ease-in-out;
|
|
|
|
}
|
|
|
|
&-opened &-submenu-title-icon{
|
|
|
|
transform: rotate(180deg);
|
|
|
|
}
|
|
|
|
|
|
|
|
&-vertical &-submenu &-item{
|
|
|
|
padding-left: 43px;
|
|
|
|
}
|
|
|
|
&-vertical &-item-group{
|
|
|
|
&-title{
|
|
|
|
font-size: @font-size-base;
|
|
|
|
padding-left: 28px;
|
|
|
|
}
|
|
|
|
}
|
2016-12-08 14:13:17 +08:00
|
|
|
&-dark&-vertical &-item-group{
|
|
|
|
&-title{
|
|
|
|
color: @text-color;
|
|
|
|
}
|
|
|
|
}
|
2016-12-08 11:55:38 +08:00
|
|
|
|
|
|
|
&-light&-vertical &-item{
|
|
|
|
border-right: 2px solid transparent;
|
|
|
|
&-active:not(.@{menu-prefix-cls}-submenu){
|
|
|
|
color: @primary-color;
|
|
|
|
border-right: 2px solid @primary-color;
|
|
|
|
z-index: 2;
|
|
|
|
}
|
|
|
|
}
|
2016-12-08 14:13:17 +08:00
|
|
|
|
|
|
|
&-dark&-vertical &-item, &-dark&-vertical &-submenu-title{
|
|
|
|
color: @subsidiary-color;
|
2016-12-08 18:33:04 +08:00
|
|
|
&-active:not(.@{menu-prefix-cls}-submenu),
|
|
|
|
&-active:not(.@{menu-prefix-cls}-submenu):hover
|
|
|
|
{
|
2016-12-08 14:13:17 +08:00
|
|
|
background: @menu-dark-active-bg;
|
|
|
|
}
|
2016-12-08 18:33:04 +08:00
|
|
|
&:hover{
|
|
|
|
color: #fff;
|
|
|
|
background: @title-color;
|
|
|
|
}
|
2016-12-08 14:13:17 +08:00
|
|
|
&-active:not(.@{menu-prefix-cls}-submenu){
|
|
|
|
color: @primary-color;
|
|
|
|
border-right: 2px solid @primary-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&-dark&-vertical &-submenu &-item{
|
|
|
|
&:hover{
|
2016-12-08 15:18:40 +08:00
|
|
|
color: #fff;
|
2016-12-08 18:33:04 +08:00
|
|
|
background: transparent !important;
|
2016-12-08 14:13:17 +08:00
|
|
|
}
|
2016-12-08 18:33:04 +08:00
|
|
|
&-active,&-active:hover{
|
2016-12-08 14:13:17 +08:00
|
|
|
border-right: none;
|
|
|
|
color: #fff;
|
2016-12-08 18:33:04 +08:00
|
|
|
background: @primary-color !important;
|
2016-12-08 14:13:17 +08:00
|
|
|
}
|
|
|
|
}
|
2016-12-08 18:33:04 +08:00
|
|
|
&-dark&-vertical &-item-active &-submenu-title{
|
|
|
|
color: #fff;
|
|
|
|
}
|
2016-12-08 14:13:17 +08:00
|
|
|
|
|
|
|
&-dark&-vertical &-opened{
|
|
|
|
background: @menu-dark-active-bg;
|
2016-12-08 18:33:04 +08:00
|
|
|
.@{menu-prefix-cls}-submenu-title{
|
|
|
|
background: @title-color;
|
|
|
|
}
|
2016-12-08 14:13:17 +08:00
|
|
|
}
|
2016-12-07 20:45:21 +08:00
|
|
|
}
|
|
|
|
.select-item(@menu-prefix-cls, @menu-dropdown-item-prefix-cls);
|