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.

167 lines
3.4 KiB

@import "../mixins/index";
@dropdown-prefix-cls: ~"@{css-prefix}dropdown";
.@{dropdown-prefix-cls} {
position: absolute;
left: -9999px;
top: -9999px;
9 years ago
z-index: @zindex-dropdown;
display: block;
font-size: 12px;
font-weight: normal;
line-height: 1.5;
&-wrap {
position: relative;
.@{btn-prefix-cls} > .@{iconfont-css-prefix}-down {
.iconfont-size-under-12px(10px);
}
.anticon-down:before {
transition: transform 0.2s ease;
}
}
&-wrap-open {
.anticon-down:before {
.rotate(180deg);
}
}
&-hidden,
&-menu-hidden {
10 years ago
display: none;
}
&-menu {
outline: none;
position: relative;
list-style-type: none;
padding: 0;
margin: 0;
text-align: left;
background-color: #fff;
9 years ago
border-radius: @border-radius-base;
box-shadow: @box-shadow-base;
background-clip: padding-box;
border: 1px solid @border-color-base;
&-item,
&-submenu-title {
padding: 7px 15px;
margin: 0;
clear: both;
font-size: 12px;
font-weight: normal;
color: #666;
white-space: nowrap;
10 years ago
cursor: pointer;
transition: background 0.3s ease;
> a {
color: #666;
display: block;
padding: 7px 15px;
margin: -7px -15px;
}
&:hover {
10 years ago
background-color: tint(@primary-color, 90%);
}
&-disabled {
color: #ccc;
cursor: not-allowed;
pointer-events: none;
&:hover {
color: #ccc;
background-color: #fff;
cursor: not-allowed;
}
}
&:first-child {
border-radius: @border-radius-base @border-radius-base 0 0;
}
&:last-child {
border-radius: 0 0 @border-radius-base @border-radius-base;
}
&-divider {
height: 1px;
overflow: hidden;
background-color: @border-color-split;
line-height: 0;
}
}
&-submenu-title:after {
font-family: "anticon" !important;
position: absolute;
content: "\e600";
right: 15px;
color: #999;
.iconfont-size-under-12px(8px);
}
&-submenu-vertical {
position: relative;
}
&-submenu-vertical > & {
top: 0;
left: 100%;
position: absolute;
min-width: 100%;
margin-left: 4px;
transform-origin: 0 0;
}
&-submenu:first-child &-submenu-title {
border-radius: @border-radius-base @border-radius-base 0 0;
}
&-submenu:last-child &-submenu-title {
border-radius: 0 0 @border-radius-base @border-radius-base;
}
}
9 years ago