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.

267 lines
4.8 KiB

10 years ago
@selectPrefixCls: ant-select;
//mixin
.selection__clear(){
cursor: pointer;
float: right;
font-weight: bold;
}
.@{selectPrefixCls} {
box-sizing: border-box;
display: inline-block;
margin: 0;
position: relative;
vertical-align: middle;
color: #666;
10 years ago
font-size: @font-size-base;
ul, li {
margin: 0;
padding: 0;
list-style: none;
}
> ul > li > a {
padding: 0;
background-color: #fff;
}
// arrow
&-arrow {
height: 26px;
position: absolute;
top: 1px;
right: 1px;
width: 20px;
10 years ago
font-family: 'anticon';
&:before {
content: '\e611';
.rotate(90deg);
position: absolute;
10 years ago
top: 4px;
left: 3px;
}
}
&-combobox &-arrow {
display: none;
}
&-selection {
outline: none;
user-select: none;
-webkit-user-select: none;
box-sizing: border-box;
display: block;
background-color: #fff;
border-radius: 6px;
border: 1px solid #d9d9d9;
.transition(all .3s @ease-in-out);
&:hover {
border-color: #23c0fa;
10 years ago
box-shadow: 0 0 2px fadeout(#2db7f5, 20%);
}
&:active {
border-color: #2db7f5;
}
}
10 years ago
&-disabled {
color: #ccc;
cursor: not-allowed;
pointer-events: none;
}
&-disabled &-selection {
&:hover, &:active {
border-color: #d9d9d9;
}
}
&-selection--single {
height: 28px;
cursor: pointer;
.@{selectPrefixCls}-selection__rendered {
display: block;
overflow: hidden;
text-overflow: ellipsis;
padding-left: 10px;
padding-right: 20px;
line-height: 26px;
}
.@{selectPrefixCls}-selection__clear {
.selection__clear();
}
}
&-selection--multiple {
10 years ago
min-height: 28px;
cursor: text;
.@{selectPrefixCls}-selection__rendered {
10 years ago
//display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
padding-left: 8px;
padding-bottom: 4px;
}
.@{selectPrefixCls}-selection__clear {
.selection__clear();
margin-top: 5px;
margin-right: 10px;
}
10 years ago
> ul > li {
margin-top: 4px;
height: 20px;
line-height: 20px;
}
.@{selectPrefixCls}-selection__choice {
background-color: #f3f3f3;
border-radius: 4px;
cursor: default;
float: left;
10 years ago
padding: 0 8px;
margin-right: 4px;
}
.@{selectPrefixCls}-selection__choice__remove {
color: #919191;
cursor: pointer;
display: inline-block;
font-weight: bold;
padding: 0 0 0 8px;
&:hover {
color: #333;
}
}
}
&-search--inline {
float: left;
.@{selectPrefixCls}-search__field {
border: none;
font-size: 100%;
10 years ago
//margin-top: 5px;
background: transparent;
outline: 0;
}
> i {
float: right;
}
}
&-dropdown {
display: none;
background-color: white;
border: 1px solid #d9d9d9;
box-shadow: 0 0px 4px #d9d9d9;
border-radius: 4px;
box-sizing: border-box;
width: 100%;
z-index: 100;
//border-top: none;
//border-top-left-radius: 0;
//border-top-right-radius: 0;
position: absolute;
top: 100%;
margin-top: 4px;
outline: none;
.@{selectPrefixCls}-menu-item[aria-selected=true] {
background-color: #ddd;
}
}
&-search--dropdown {
display: block;
padding: 4px;
.@{selectPrefixCls}-search__field {
padding: 4px;
width: 100%;
box-sizing: border-box;
border: 1px solid #d9d9d9;
border-radius: 4px;
outline: none;
}
&.@{selectPrefixCls}-search--hide {
display: none;
}
}
&-open {
10 years ago
.@{selectPrefixCls}-arrow {
&:before {
.rotate(270deg);
}
}
.@{selectPrefixCls}-dropdown {
display: block;
}
.@{selectPrefixCls}-selection {
border-color: #23c0fa;
box-shadow: 0 0 3px #23c0fa;
}
}
&-menu {
outline: none;
margin-bottom: 0;
padding-left: 0; // Override default ul/ol
list-style: none;
z-index: 9999;
10 years ago
max-height: 250px;
overflow: auto;
> li {
margin: 0;
padding: 0;
}
& > &-item {
position: relative;
display: block;
padding: 7px 10px;
font-weight: normal;
color: #666666;
white-space: nowrap;
cursor: pointer;
&:hover, &-active, &-selected {
background-color: rgba(142, 200, 249, 0.1) !important;
}
&-disabled {
color: #ccc;
cursor: not-allowed;
pointer-events: none;
&:hover {
color: #ccc;
background-color: #fff;
cursor: not-allowed;
}
}
&-divider {
height: 1px;
margin: 1px 0;
overflow: hidden;
background-color: #e5e5e5;
line-height: 0;
}
}
}
10 years ago
}