selectbox/autocomplete.css

187 lines
2.8 KiB
CSS

.input
{
background: white;
border: 1px solid #d8d8d8;
border-radius: 0;
font-size: 13px;
line-height: 20px;
padding: 0;
height: 33px;
position: relative;
}
.input.focused
{
box-shadow: inset 0 0 0 1px #7ab1ff;
}
.input:after
{
border: 0;
top: 50%;
width: 0;
position: absolute;
right: 1em;
text-align: right;
font-size: 20px;
margin-top: -10px;
font-family: FontAwesome;
content: "\f107";
color: #c0c0c0;
height: 0.75em;
cursor: pointer;
}
.input.disabled
{
background: #f4f4f4;
}
.input.multiple
{
display: flex;
overflow: hidden;
cursor: text;
height: auto;
}
.input.readonly, .input.readonly .inputElement
{
cursor: pointer;
}
.suggestions
{
outline: none;
background: white;
margin-top: 0;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.24);
overflow-x: hidden;
overflow-y: auto;
padding: 0;
width: 100%;
max-height: 100%;
}
.suggestion
{
font-size: 13px;
padding: 7px;
user-select: none;
cursor: pointer;
}
.suggestion.disabled
{
color: #aaa;
background: #f4f6f8;
}
.suggestion.active
{
background: #d6e8f6;
}
.inputElement
{
background: transparent;
font-size: inherit;
font-weight: inherit;
line-height: 200%;
border: 0;
padding: 0 2em 0 .5em;
box-sizing: border-box;
margin: 0;
height: 100%;
display: block;
outline: none;
width: 100%;
}
.inputElement::-ms-clear
{
display: none;
}
.inputElement[disabled]
{
background: transparent;
}
.multiple .inputElement
{
padding: 0;
display: inline-block;
height: 29px;
}
.multiple .inputElement.sizer
{
display: inline-block;
width: auto;
position: absolute;
padding: 0 2px;
top: -100px;
white-space: pre;
visibility: hidden;
}
.multiple .values
{
overflow: hidden;
flex: 1;
margin: 0 2em 0 5px;
line-height: 10px;
}
.multiple .values .value
{
cursor: pointer;
display: inline-block;
border-radius: 2px;
background: #e0f0ff;
border: 1px solid #c0e0ff;
line-height: 15px;
padding: 3px;
margin: 2px 4px 2px 0;
}
.withClear .inputElement
{
padding-right: 52px;
}
.clear:after
{
content: "✕";
cursor: pointer;
color: #aaa;
width: 20px;
height: 20px;
border-radius: 10px;
box-sizing: border-box;
border: 1px solid #aaa;
display: block;
position: absolute;
left: auto;
top: 5px;
right: 28px;
line-height: 19px;
font-size: 17px;
text-align: center;
padding: 0;
}
.clearValue:after
{
content: "✕";
color: #444;
cursor: pointer;
display: inline-block;
font-size: 18px;
vertical-align: middle;
margin: 0 3px 0 0;
text-align: center;
padding: 0;
}