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.

406 lines
7.7 KiB

10 years ago
@selectPrefixCls: ant-select;
10 years ago
@import "../mixins/iconfont";
//mixin
10 years ago
.selection__clear() {
cursor: pointer;
float: right;
font-weight: bold;
}
.selected_icon() {
position: relative;
&:after {
.iconfont-size-under-12px(9px);
display: inline-block;
content: '\e613';
font-family: 'anticon';
font-weight: bold;
position: absolute;
top: 6px;
right: 0;
padding-right: 16px;
color: @primary-color;
}
}
.@{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 {
.iconfont-mixin();
position: absolute;
top: 50%;
right: 8px;
line-height: 1;
margin-top: -5px;
.iconfont-size-under-12px(8px);
* {
display: none;
}
10 years ago
&:before {
content: '\e611';
.ie-rotate(1);
.rotate(90deg);
transition: transform 0.2s ease;
}
}
&-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 {
.hover;
}
&:active {
.active;
}
}
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();
}
.@{selectPrefixCls}-selection__placeholder {
color: #ccc;
}
}
&-lg {
.ant-select-selection--single {
9 years ago
height: 32px;
.ant-select-selection__rendered {
9 years ago
line-height: 30px;
font-size: 14px;
}
}
.ant-select-selection--multiple {
9 years ago
min-height: 32px;
.ant-select-selection__rendered {
li {
9 years ago
height: 24px;
.ant-select-selection__choice__content {
9 years ago
font-size: 14px;
line-height: 24px;
}
}
}
}
}
&-sm {
.ant-select-selection--single {
9 years ago
height: 22px;
.ant-select-selection__rendered {
9 years ago
line-height: 20px;
}
}
.ant-select-selection--multiple {
9 years ago
min-height: 22px;
.ant-select-selection__rendered {
li {
9 years ago
height: 14px;
.ant-select-selection__choice__content {
9 years ago
line-height: 14px;
position: relative;
top: -3px;
}
.ant-select-selection__choice__remove {
position: relative;
top: -4px;
}
9 years ago
}
}
}
}
10 years ago
&-disabled &-selection__choice__remove {
color: #ccc;
cursor: default;
&:hover {
color: #ccc;
}
}
&-search--inline {
float: left;
.@{selectPrefixCls}-search__field {
border: none;
font-size: 100%;
background: transparent;
outline: 0;
}
> i {
float: right;
}
}
&-selection--multiple {
10 years ago
min-height: 28px;
cursor: text;
9 years ago
.@{selectPrefixCls}-search--inline {
width: auto;
.@{selectPrefixCls}-search__field {
width: 0.75em;
}
}
.@{selectPrefixCls}-selection__rendered {
overflow: hidden;
text-overflow: ellipsis;
10 years ago
padding-left: 4px;
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 {
10 years ago
.iconfont-mixin();
color: #919191;
cursor: pointer;
display: inline-block;
font-weight: bold;
.iconfont-size-under-12px(8px);
10 years ago
padding: 0 0 0 4px;
position: relative;
top: -1px;
left: 4px;
&:hover {
color: #333;
}
10 years ago
&:before {
content: "\e61e";
}
}
}
.@{selectPrefixCls}-selection--single + .@{selectPrefixCls}-dropdown {
.@{selectPrefixCls}-dropdown-menu-item-selected {
background-color: tint(@primary-color, 90%);
position: relative;
&:after {
content: '\e613';
font-family: 'anticon';
.iconfont-size-under-12px(8px);
font-weight: bold;
position: absolute;
top: 6px;
right: 16px;
color: @primary-color;
background-color: tint(@primary-color, 90%);
}
}
}
.@{selectPrefixCls}-selection--multiple + .@{selectPrefixCls}-dropdown {
.@{selectPrefixCls}-dropdown-menu-item {
padding: 7px 33px 7px 16px;
}
.@{selectPrefixCls}-dropdown-menu-item-selected {
.selected_icon();
}
}
&-dropdown {
display: none;
background-color: white;
border: 1px solid #d9d9d9;
box-shadow: @overlay-shadow;
border-radius: 4px;
box-sizing: border-box;
z-index: 100;
10 years ago
left: -9999px;
top: -9999px;
position: absolute;
outline: none;
10 years ago
&-menu {
outline: none;
margin-bottom: 0;
padding-left: 0; // Override default ul/ol
list-style: none;
z-index: 9999;
max-height: 250px;
overflow: auto;
> li {
margin: 0;
padding: 0;
}
9 years ago
&-item-group-list {
margin: 0;
padding: 0;
> li.@{selectPrefixCls}-dropdown-menu-item {
padding-left: 24px;
9 years ago
}
}
&-item-group-title {
color: #999;
line-height: 1.5;
padding: 8px 16px;
9 years ago
}
li&-item {
10 years ago
position: relative;
display: block;
padding: 7px 16px;
font-weight: normal;
color: #666666;
white-space: nowrap;
cursor: pointer;
&:hover, &-active {
10 years ago
background-color: tint(@primary-color, 90%) !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;
}
}
}
}
&-dropdown-container-open, &-open {
.@{selectPrefixCls}-dropdown {
display: block;
}
}
&-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:before {
.ie-rotate(3);
10 years ago
.rotate(270deg);
}
.@{selectPrefixCls}-selection {
.active();
}
}
&-combobox {
.@{selectPrefixCls}-arrow {
display: none;
}
.@{selectPrefixCls}-search--inline {
float: none;
}
.@{selectPrefixCls}-search__field {
padding: 0 10px;
width: 100%;
}
.@{selectPrefixCls}-selection__rendered {
padding: 0;
}
}
10 years ago
}