2015-06-15 17:17:23 +08:00
|
|
|
@selectPrefixCls: ant-select;
|
2015-06-09 21:16:59 +08:00
|
|
|
|
2015-06-11 19:23:35 +08:00
|
|
|
//mixin
|
|
|
|
.selection__clear(){
|
|
|
|
cursor: pointer;
|
|
|
|
float: right;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
2015-06-09 21:16:59 +08:00
|
|
|
.@{selectPrefixCls} {
|
|
|
|
box-sizing: border-box;
|
|
|
|
display: inline-block;
|
|
|
|
margin: 0;
|
|
|
|
position: relative;
|
|
|
|
vertical-align: middle;
|
|
|
|
color: #666;
|
2015-06-14 15:52:47 +08:00
|
|
|
font-size: @font-size-base;
|
2015-06-09 21:16:59 +08:00
|
|
|
|
|
|
|
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;
|
|
|
|
b {
|
2015-06-11 19:23:35 +08:00
|
|
|
border-color: #999999 transparent transparent transparent;
|
2015-06-09 21:16:59 +08:00
|
|
|
border-style: solid;
|
|
|
|
border-width: 5px 4px 0 4px;
|
|
|
|
height: 0;
|
|
|
|
left: 50%;
|
|
|
|
margin-left: -4px;
|
|
|
|
margin-top: -2px;
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
width: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-06-11 19:23:35 +08:00
|
|
|
&-selection {
|
|
|
|
outline: none;
|
2015-06-09 21:16:59 +08:00
|
|
|
user-select: none;
|
|
|
|
-webkit-user-select: none;
|
|
|
|
|
2015-06-11 19:23:35 +08:00
|
|
|
box-sizing: border-box;
|
|
|
|
display: block;
|
|
|
|
|
2015-06-09 21:16:59 +08:00
|
|
|
background-color: #fff;
|
2015-06-11 19:23:35 +08:00
|
|
|
border-radius: 6px;
|
2015-06-09 21:16:59 +08:00
|
|
|
border: 1px solid #d9d9d9;
|
2015-06-15 11:01:15 +08:00
|
|
|
.transition(all .3s @ease-in-out);
|
|
|
|
|
2015-06-11 19:23:35 +08:00
|
|
|
&:hover {
|
|
|
|
border-color: #23c0fa;
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
border-color: #2db7f5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-selection--single {
|
|
|
|
height: 28px;
|
|
|
|
cursor: pointer;
|
2015-06-09 21:16:59 +08:00
|
|
|
|
|
|
|
.@{selectPrefixCls}-selection__rendered {
|
|
|
|
display: block;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
2015-06-11 19:23:35 +08:00
|
|
|
padding-left: 10px;
|
|
|
|
padding-right: 20px;
|
2015-06-09 21:16:59 +08:00
|
|
|
line-height: 28px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{selectPrefixCls}-selection__clear {
|
2015-06-11 19:23:35 +08:00
|
|
|
.selection__clear();
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-selection--multiple {
|
|
|
|
min-height: 32px;
|
|
|
|
cursor: text;
|
|
|
|
|
|
|
|
.@{selectPrefixCls}-selection__rendered {
|
|
|
|
display: inline-block;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
padding-left: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{selectPrefixCls}-selection__clear {
|
2015-06-11 19:23:35 +08:00
|
|
|
.selection__clear();
|
2015-06-09 21:16:59 +08:00
|
|
|
margin-top: 5px;
|
|
|
|
margin-right: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{selectPrefixCls}-selection__choice {
|
|
|
|
background-color: #f3f3f3;
|
|
|
|
border-radius: 4px;
|
|
|
|
cursor: default;
|
|
|
|
float: left;
|
|
|
|
margin-right: 4px;
|
|
|
|
margin-top: 4px;
|
|
|
|
padding: 4px 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{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%;
|
|
|
|
margin-top: 5px;
|
|
|
|
background: transparent;
|
|
|
|
outline: 0;
|
|
|
|
}
|
2015-06-11 19:23:35 +08:00
|
|
|
> i {
|
|
|
|
float: right;
|
|
|
|
}
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&-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;
|
2015-06-11 19:23:35 +08:00
|
|
|
//border-top: none;
|
|
|
|
//border-top-left-radius: 0;
|
|
|
|
//border-top-right-radius: 0;
|
2015-06-09 21:16:59 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 100%;
|
2015-06-11 19:23:35 +08:00
|
|
|
margin-top: 4px;
|
2015-06-09 21:16:59 +08:00
|
|
|
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 {
|
|
|
|
.@{selectPrefixCls}-arrow b {
|
|
|
|
border-color: transparent transparent #888 transparent;
|
|
|
|
border-width: 0 4px 5px 4px;
|
|
|
|
}
|
|
|
|
.@{selectPrefixCls}-dropdown {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{selectPrefixCls}-selection {
|
2015-06-11 19:23:35 +08:00
|
|
|
//border-bottom-left-radius: 0;
|
|
|
|
//border-bottom-right-radius: 0;
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-menu {
|
|
|
|
outline: none;
|
|
|
|
margin-bottom: 0;
|
|
|
|
padding-left: 0; // Override default ul/ol
|
|
|
|
list-style: none;
|
2015-06-11 19:23:35 +08:00
|
|
|
z-index: 9999;
|
2015-06-14 17:26:31 +08:00
|
|
|
max-height: 250px;
|
|
|
|
overflow: auto;
|
2015-06-09 21:16:59 +08:00
|
|
|
|
2015-06-11 19:23:35 +08:00
|
|
|
> li {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
|
|
|
|
2015-06-11 19:23:35 +08:00
|
|
|
& > &-item {
|
2015-06-09 21:16:59 +08:00
|
|
|
position: relative;
|
|
|
|
display: block;
|
2015-06-11 19:23:35 +08:00
|
|
|
padding: 7px 10px;
|
|
|
|
font-weight: normal;
|
|
|
|
color: #666666;
|
2015-06-09 21:16:59 +08:00
|
|
|
white-space: nowrap;
|
|
|
|
|
2015-06-11 19:23:35 +08:00
|
|
|
&: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;
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-06-14 15:52:47 +08:00
|
|
|
}
|