You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

249 lines
5.1 KiB

9 years ago
@menuPrefixCls: ~"@{css-prefix}menu";
.@{menuPrefixCls} {
outline: none;
margin-bottom: 0;
padding-left: 0; // Override default ul/ol
list-style: none;
z-index: 1001;
9 years ago
border: 1px solid #d9d9d9;
box-shadow: @overlay-shadow;
border-radius: @border-radius-base;
color: @text-color;
9 years ago
&-item-group-list {
margin: 0;
padding: 0;
}
&-item-group-title {
color: #999;
line-height: 1.5;
padding: 8px 10px;
border-bottom: 1px solid #dedede;
}
&-item {
cursor: pointer;
transition: all 0.3s ease;
}
9 years ago
&-inline > &-item-active,
&-submenu-inline&-submenu-active,
&-submenu-inline&-submenu-active > &-submenu-title:hover {
background-color: #fff;
}
&-inline > &-item-active:hover,
&-item-active,
&-submenu-active,
&-submenu-inline&-submenu-active > &-submenu-title:hover {
9 years ago
background-color: tint(@primary-color, 90%);
9 years ago
}
&-item-selected {
9 years ago
background-color: tint(@primary-color, 90%);
color: @primary-color;
9 years ago
}
& > li&-submenu {
padding: 0;
cursor: pointer;
transition: all 0.3s ease;
9 years ago
}
9 years ago
&-submenu-horizontal > .@{menuPrefixCls} {
9 years ago
top: 100%;
left: 0;
9 years ago
position: absolute;
min-width: 100%;
margin-top: 7px;
9 years ago
}
9 years ago
&-submenu-vertical > .@{menuPrefixCls} {
9 years ago
top: 0;
left: 100%;
9 years ago
position: absolute;
min-width: 160px;
9 years ago
margin-left: 4px;
}
9 years ago
&-item, &-submenu-title {
9 years ago
margin: 0;
position: relative;
display: block;
white-space: nowrap;
// Disabled state sets text to gray and nukes hover/tab effects
&.@{menuPrefixCls}-item-disabled, &.@{menuPrefixCls}-submenu-disabled {
color: #999 !important;
9 years ago
}
}
& > &-item-divider {
height: 1px;
margin: 1px 0;
overflow: hidden;
padding: 0;
line-height: 0;
background-color: #e5e5e5;
}
&-submenu {
position: relative;
> .@{menuPrefixCls} {
display: none;
background-color: #fff;
}
&-vertical > .@{menuPrefixCls}-submenu-title:after {
font-family: "anticon" !important;
font-style: normal;
vertical-align: baseline;
text-align: center;
text-transform: none;
text-rendering: auto;
position: absolute;
transition: transform .3s ease;
content: "\e600";
right: 16px;
.ie-rotate(3);
transform: rotate(270deg) scale(0.75);
}
&-inline > .@{menuPrefixCls}-submenu-title:after {
font-family: "anticon" !important;
font-style: normal;
vertical-align: baseline;
text-align: center;
text-transform: none;
text-rendering: auto;
position: absolute;
transition: transform .3s ease;
content: "\e600";
right: 16px;
top: 0;
.iconfont-size-under-12px(8px);
}
9 years ago
&-open {
9 years ago
> .@{menuPrefixCls} {
display: block;
}
&.@{menuPrefixCls}-submenu-inline > .@{menuPrefixCls}-submenu-title:after {
9 years ago
.ie-rotate(1);
transform: rotate(180deg) scale(0.75);
}
9 years ago
}
}
.@{menuPrefixCls}-submenu-title, .@{menuPrefixCls}-item {
.anticon {
width: 14px;
margin-right: 8px;
top: -1px;
color: #999;
9 years ago
}
}
&-horizontal {
background-color: #FBFBFB;
9 years ago
border: none;
border-bottom: 1px solid #d9d9d9;
box-shadow: none;
border-radius: 0;
padding-left: 24px;
z-index: 0;
9 years ago
& > .@{menuPrefixCls}-item,
& > .@{menuPrefixCls}-submenu > .@{menuPrefixCls}-submenu-title {
padding: 0 20px;
line-height: 50px;
position: relative;
top: 1px;
> a {
display: block;
color: @text-color;
&:hover {
color: @primary-color;
}
&:before, &:after {
position: absolute;
background-color: rgba(255, 255, 255, 0.001);
width: 20px;
height: 50px;
content: '';
}
&:before {
left: 0;
}
}
9 years ago
}
& > .@{menuPrefixCls}-submenu, & > .@{menuPrefixCls}-item {
float: left;
border-bottom: 2px solid transparent;
margin-right: 24px;
9 years ago
&-active,
&-selected {
9 years ago
border-bottom: 2px solid @primary-color;
background-color: #FBFBFB;
9 years ago
color: @primary-color;
.anticon {
color: @primary-color;
}
9 years ago
}
}
&:after {
content: "\20";
display: block;
height: 0;
clear: both;
}
}
9 years ago
&-vertical, &-inline {
9 years ago
padding: 12px 0;
9 years ago
& > .@{menuPrefixCls}-item, & > .@{menuPrefixCls}-submenu > .@{menuPrefixCls}-submenu-title {
padding: 0 24px;
font-size: 12px;
line-height: 42px;
height: 42px;
9 years ago
}
}
9 years ago
&-vertical&-sub {
padding: 0;
}
&-root&-vertical,
&-root&-inline {
border-radius: 0;
box-shadow: none;
}
9 years ago
&-sub&-inline {
padding: 0;
border: none;
border-radius: 0;
box-shadow: none;
& > .@{menuPrefixCls}-item, & > .@{menuPrefixCls}-submenu > .@{menuPrefixCls}-submenu-title {
line-height: 34px;
height: 34px;
list-style-type: disc;
list-style-position: inside;
9 years ago
}
}
}
.@{menuPrefixCls}-submenu-title, .@{menuPrefixCls}-item {
.anticon {
width: 14px;
margin-right: 8px;
top: -1px;
}
9 years ago
}