antd
Version:
An enterprise-class UI design language and React-based implementation
550 lines (549 loc) • 14.8 kB
CSS
.ant-select {
box-sizing: border-box;
display: inline-block;
position: relative;
color: #666;
font-size: 12px;
}
.ant-select > ul > li > a {
padding: 0;
background-color: #fff;
}
.ant-select-arrow {
font-style: normal;
vertical-align: baseline;
text-align: center;
text-transform: none;
text-rendering: auto;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
position: absolute;
top: 50%;
right: 8px;
line-height: 1;
margin-top: -6px;
display: inline-block;
font-size: 12px;
font-size: 9px \9;
-webkit-transform: scale(0.75) rotate(0deg);
-ms-transform: scale(0.75) rotate(0deg);
transform: scale(0.75) rotate(0deg);
/* IE6-IE8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=1, M12=0, M21=0, M22=1)";
zoom: 1;
}
.ant-select-arrow:before {
display: block;
font-family: "anticon" ;
}
:root .ant-select-arrow {
-webkit-filter: none;
filter: none;
}
:root .ant-select-arrow {
font-size: 12px;
}
.ant-select-arrow * {
display: none;
}
.ant-select-arrow:before {
content: '\e61d';
-webkit-transition: -webkit-transform 0.2s ease;
transition: -webkit-transform 0.2s ease;
transition: transform 0.2s ease;
transition: transform 0.2s ease, -webkit-transform 0.2s ease;
}
.ant-select-selection {
outline: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
box-sizing: border-box;
display: block;
background-color: #fff;
border-radius: 6px;
border: 1px solid #d9d9d9;
-webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.ant-select-selection:hover {
border-color: #57c5f7;
}
.ant-select-focused .ant-select-selection,
.ant-select-selection:focus,
.ant-select-selection:active {
border-color: #57c5f7;
outline: 0;
box-shadow: 0 0 0 2px rgba(45, 183, 245, 0.2);
}
.ant-select-selection__clear {
display: inline-block;
font-style: normal;
vertical-align: baseline;
text-align: center;
text-transform: none;
text-rendering: auto;
opacity: 0;
position: absolute;
right: 8px;
z-index: 1;
background: #fff;
top: 50%;
font-size: 12px;
color: #ccc;
width: 12px;
height: 12px;
margin-top: -6px;
line-height: 12px;
cursor: pointer;
-webkit-transition: color 0.3s ease, opacity 0.15s ease;
transition: color 0.3s ease, opacity 0.15s ease;
}
.ant-select-selection__clear:before {
display: block;
font-family: 'anticon';
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "\e62e";
}
.ant-select-selection__clear:hover {
color: #999;
}
.ant-select-selection:hover .ant-select-selection__clear {
opacity: 1;
}
.ant-select-selection-selected-value {
float: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 100%;
padding-right: 16px;
}
.ant-select-disabled {
color: #ccc;
}
.ant-select-disabled .ant-select-selection {
background: #f7f7f7;
cursor: not-allowed;
}
.ant-select-disabled .ant-select-selection:hover,
.ant-select-disabled .ant-select-selection:focus,
.ant-select-disabled .ant-select-selection:active {
border-color: #d9d9d9;
box-shadow: none;
}
.ant-select-disabled .ant-select-selection__clear {
display: none;
visibility: hidden;
pointer-events: none;
}
.ant-select-disabled .ant-select-selection--multiple .ant-select-selection__choice {
background: #e9e9e9;
color: #aaa;
padding-right: 10px;
}
.ant-select-disabled .ant-select-selection--multiple .ant-select-selection__choice__remove {
display: none;
}
.ant-select-selection--single {
height: 28px;
position: relative;
cursor: pointer;
}
.ant-select-selection__rendered {
display: block;
margin-left: 8px;
margin-right: 8px;
position: relative;
line-height: 26px;
}
.ant-select-selection__rendered:after {
content: '.';
visibility: hidden;
pointer-events: none;
display: inline-block;
width: 0;
}
.ant-select-lg .ant-select-selection--single {
height: 32px;
}
.ant-select-lg .ant-select-selection__rendered {
line-height: 30px;
}
.ant-select-lg .ant-select-selection--multiple {
min-height: 32px;
}
.ant-select-lg .ant-select-selection--multiple .ant-select-selection__rendered li {
height: 24px;
line-height: 24px;
}
.ant-select-sm .ant-select-selection {
border-radius: 4px;
}
.ant-select-sm .ant-select-selection--single {
height: 22px;
}
.ant-select-sm .ant-select-selection__rendered {
line-height: 20px;
}
.ant-select-sm .ant-select-selection--multiple {
min-height: 22px;
}
.ant-select-sm .ant-select-selection--multiple .ant-select-selection__rendered li {
height: 14px;
line-height: 14px;
}
.ant-select-disabled .ant-select-selection__choice__remove {
color: #ccc;
cursor: default;
}
.ant-select-disabled .ant-select-selection__choice__remove:hover {
color: #ccc;
}
.ant-select-search__field__wrap {
display: inline-block;
position: relative;
}
.ant-select-selection__placeholder,
.ant-select-search__field__placeholder {
position: absolute;
top: 50%;
left: 0;
right: 9px;
color: #ccc;
line-height: 20px;
height: 20px;
max-width: 100%;
margin-top: -10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ant-select-search--inline {
position: absolute;
height: 100%;
}
.ant-select-selection--multiple .ant-select-search--inline {
float: left;
position: static;
}
.ant-select-search--inline .ant-select-search__field__wrap {
width: 100%;
height: 100%;
}
.ant-select-search--inline .ant-select-search__field {
border: 0;
font-size: 100%;
height: 100%;
width: 100%;
background: transparent;
outline: 0;
border-radius: 6px;
}
.ant-select-search--inline .ant-select-search__field__mirror {
position: absolute;
top: 0;
left: -9999px;
white-space: pre;
pointer-events: none;
}
.ant-select-search--inline > i {
float: right;
}
.ant-select-selection--multiple {
min-height: 28px;
cursor: text;
padding-bottom: 3px;
zoom: 1;
}
.ant-select-selection--multiple:before,
.ant-select-selection--multiple:after {
content: " ";
display: table;
}
.ant-select-selection--multiple:after {
clear: both;
visibility: hidden;
font-size: 0;
height: 0;
}
.ant-select-selection--multiple .ant-select-search--inline {
width: auto;
padding: 0;
}
.ant-select-selection--multiple .ant-select-search--inline .ant-select-search__field {
width: 0.75em;
}
.ant-select-selection--multiple .ant-select-selection__rendered {
margin-left: 5px;
margin-bottom: -3px;
height: auto;
}
.ant-select-selection--multiple > ul > li,
.ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 3px;
height: 20px;
line-height: 20px;
}
.ant-select-selection--multiple .ant-select-selection__choice {
background-color: #f3f3f3;
border-radius: 4px;
cursor: default;
float: left;
padding: 0 16px;
margin-right: 4px;
max-width: 99%;
position: relative;
overflow: hidden;
-webkit-transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
padding: 0 20px 0 10px;
}
.ant-select-selection--multiple .ant-select-selection__choice__disabled {
padding: 0 10px;
}
.ant-select-selection--multiple .ant-select-selection__choice__content {
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
-webkit-transition: margin 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transition: margin 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.ant-select-selection--multiple .ant-select-selection__choice__remove {
font-style: normal;
vertical-align: baseline;
text-align: center;
text-transform: none;
text-rendering: auto;
line-height: 1;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #999;
line-height: inherit;
cursor: pointer;
font-weight: bold;
-webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
display: inline-block;
font-size: 12px;
font-size: 8px \9;
-webkit-transform: scale(0.66666667) rotate(0deg);
-ms-transform: scale(0.66666667) rotate(0deg);
transform: scale(0.66666667) rotate(0deg);
/* IE6-IE8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=1, M12=0, M21=0, M22=1)";
zoom: 1;
position: absolute;
right: 4px;
padding: 0 0 0 8px;
}
.ant-select-selection--multiple .ant-select-selection__choice__remove:before {
display: block;
font-family: "anticon" ;
}
:root .ant-select-selection--multiple .ant-select-selection__choice__remove {
-webkit-filter: none;
filter: none;
}
:root .ant-select-selection--multiple .ant-select-selection__choice__remove {
font-size: 12px;
}
.ant-select-selection--multiple .ant-select-selection__choice__remove:hover {
color: #404040;
}
.ant-select-selection--multiple .ant-select-selection__choice__remove:before {
content: "\e633";
}
.ant-select-open .ant-select-arrow {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
-ms-transform: rotate(180deg);
}
.ant-select-open .ant-select-arrow:before {
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.ant-select-open .ant-select-selection {
border-color: #57c5f7;
outline: 0;
box-shadow: 0 0 0 2px rgba(45, 183, 245, 0.2);
}
.ant-select-combobox .ant-select-arrow {
display: none;
}
.ant-select-combobox .ant-select-search--inline {
height: 100%;
width: 100%;
float: none;
}
.ant-select-combobox .ant-select-search__field__wrap {
width: 100%;
height: 100%;
}
.ant-select-combobox .ant-select-search__field {
width: 100%;
height: 100%;
position: relative;
z-index: 1;
-webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
box-shadow: none;
}
.ant-select-combobox .ant-select-selection__rendered {
padding: 0;
height: 100%;
position: absolute;
left: 0;
right: 0;
}
.ant-select-combobox .ant-select-selection__rendered > ul {
height: 100%;
}
.ant-select-dropdown {
background-color: white;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
border-radius: 6px;
box-sizing: border-box;
z-index: 1050;
left: -9999px;
top: -9999px;
position: absolute;
outline: none;
overflow: hidden;
font-size: 12px;
}
.ant-select-dropdown.slide-up-enter.slide-up-enter-active.ant-select-dropdown-placement-bottomLeft,
.ant-select-dropdown.slide-up-appear.slide-up-appear-active.ant-select-dropdown-placement-bottomLeft {
-webkit-animation-name: antSlideUpIn;
animation-name: antSlideUpIn;
}
.ant-select-dropdown.slide-up-enter.slide-up-enter-active.ant-select-dropdown-placement-topLeft,
.ant-select-dropdown.slide-up-appear.slide-up-appear-active.ant-select-dropdown-placement-topLeft {
-webkit-animation-name: antSlideDownIn;
animation-name: antSlideDownIn;
}
.ant-select-dropdown.slide-up-leave.slide-up-leave-active.ant-select-dropdown-placement-bottomLeft {
-webkit-animation-name: antSlideUpOut;
animation-name: antSlideUpOut;
}
.ant-select-dropdown.slide-up-leave.slide-up-leave-active.ant-select-dropdown-placement-topLeft {
-webkit-animation-name: antSlideDownOut;
animation-name: antSlideDownOut;
}
.ant-select-dropdown-hidden {
display: none;
}
.ant-select-dropdown-menu {
outline: none;
margin-bottom: 0;
padding-left: 0;
list-style: none;
max-height: 250px;
overflow: auto;
}
.ant-select-dropdown-menu-item-group-list {
margin: 0;
padding: 0;
}
.ant-select-dropdown-menu-item-group-list > .ant-select-dropdown-menu-item {
padding-left: 24px;
}
.ant-select-dropdown-menu-item-group-title {
color: #999;
line-height: 1.5;
padding: 8px 16px;
}
.ant-select-dropdown-menu-item {
position: relative;
display: block;
padding: 7px 16px;
font-weight: normal;
color: #666;
cursor: pointer;
white-space: nowrap;
overflow: hidden;
-webkit-transition: background 0.3s ease;
transition: background 0.3s ease;
}
.ant-select-dropdown-menu-item:hover,
.ant-select-dropdown-menu-item-active {
background-color: #eaf8fe;
}
.ant-select-dropdown-menu-item-disabled {
color: #ccc;
cursor: not-allowed;
}
.ant-select-dropdown-menu-item-disabled:hover {
color: #ccc;
background-color: #fff;
cursor: not-allowed;
}
.ant-select-dropdown-menu-item-selected,
.ant-select-dropdown-menu-item-selected:hover {
background-color: #f7f7f7;
font-weight: bold;
color: #666;
}
.ant-select-dropdown-menu-item-divider {
height: 1px;
margin: 1px 0;
overflow: hidden;
background-color: #e5e5e5;
line-height: 0;
}
.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item:after {
font-family: 'anticon';
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "\e632";
color: transparent;
display: inline-block;
font-size: 12px;
font-size: 10px \9;
-webkit-transform: scale(0.83333333) rotate(0deg);
-ms-transform: scale(0.83333333) rotate(0deg);
transform: scale(0.83333333) rotate(0deg);
/* IE6-IE8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=1, M12=0, M21=0, M22=1)";
zoom: 1;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
right: 16px;
font-weight: bold;
text-shadow: 0 0.1px 0, 0.1px 0 0, 0 -0.1px 0, -0.1px 0;
}
:root .ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item:after {
-webkit-filter: none;
filter: none;
}
:root .ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item:after {
font-size: 12px;
}
.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item:hover:after {
color: #ddd;
}
.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-disabled:after {
display: none;
}
.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-selected:after,
.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-selected:hover:after {
color: #2db7f5;
display: inline-block;
}
.ant-select-dropdown-container-open .ant-select-dropdown,
.ant-select-dropdown-open .ant-select-dropdown {
display: block;
}