heyui
Version:
A UI components Library.
117 lines (112 loc) • 2.6 kB
text/less
@select-prefix: ~"@{prefix}select";
@select-item-prefix: ~"@{select-prefix}-item";
@select-check-prefix: h-icon-check;
@select-close-prefix: h-icon-close;
.@{select-prefix} {
display: inline-block;
box-sizing: border-box;
vertical-align: middle;
line-height: normal;
.@{select-prefix} {
&-placeholder{
color: @gray-color;
}
&-input{
cursor: default;
padding: 4px 30px 4px 10px;
font-size: @font-size-mini;
position: relative;
font-size: inherit;
line-height: inherit;
box-sizing: border-box;
-webkit-appearance: none;
font-family: inherit;
outline: none;
.rotate-icon-down();
}
&-multiple-tags {
>span{
color: @primary-color;
.tag-span-func();
border: 1px solid @white-color;
background-color: lighten(@primary-color, 35%);
font-size: 12px;
padding: 2px 8px;
}
}
}
&-no-autosize {
width: 100%;
.@{select-prefix}-input{
min-height: @input-height;
}
}
&-input-border {
.@{select-prefix} {
&-input{
background-color: @white-color;
border-radius: @border-radius;
border: @border;
vertical-align: top;
transition: all linear @transition-time;
&:hover {
border-color: lighten(@primary-color, 10%);
}
&.@{pop-ref-prefix} {
border-color: @primary-color;
box-shadow: 0 0 0 2px fade(@primary-color, 20%);
}
}
}
}
&-multiple {
.@{select-prefix} {
&-input{
padding: 2px 30px 0px 2px;
}
&-placeholder{
padding: 2px 0 0 5px;
}
}
}
}
.@{select-prefix}-group {
outline: none;
user-select: none;
position: relative;
font-size: @font-size-mini;
background-color: @white-color;
padding: 5px 0px;
max-height: 300px;
overflow-y: auto;
.@{select-item-prefix} {
.li-hover();
padding: 8px 10px;
position: relative;
&.@{select-item-prefix}-selected {
color: @white-color;
background-color: @primary-color;
}
}
&.@{select-prefix} {
&-multiple {
.@{select-item-prefix} {
padding-right: 40px;
.@{select-check-prefix} {
display: none;
position: absolute;
right: 10px;
font-weight: bold;
}
&-selected {
color: @primary-color;
background-color: transparent;
.li-hover();
.@{select-check-prefix} {
display: inline-block;
}
}
}
}
}
}