metro4
Version:
The front-end framework for Build responsive, mobile-first projects on the web with the first front-end component library in Metro Style
116 lines (99 loc) • 2.22 kB
text/less
@import (once) "include/vars";
@import (once) "include/mixins";
.input {
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
width: 100%;
padding: 0;
&:hover {
input {
border-color: transparent;
}
}
&.focused {
box-shadow: 0 0 0 3px rgba(red(@lightGray), green(@lightGray), blue(@lightGray), 0.45);
}
input {
border: none ;
order: 1;
flex-grow: 1;
flex-shrink: 0;
flex-basis: 0;
height: 34px;
&:focus {
box-shadow: none;
}
}
.button-group {
display: flex;
flex-wrap: nowrap;
}
.button {
background-color: transparent;
color: @dark;
height: 34px;
min-width: 34px;
&:focus {
box-shadow: none;
}
&:hover {
background-color: @light;
text-shadow: rgba(0,0,0,.25) 0.1em 0.1em 0.2em;
}
}
&.disabled .button-group {
button {
background-color: @light;
color: darken(@light, 10%);
}
}
.prepend {order: 1}
.append {order: 4}
input {order: 2;}
.button-group {order: 3;}
}
.input {
.autocomplete-list {
margin: 0;
padding: 0;
list-style: none inside;
position: absolute;
top: 100%;
left: 0;
width: 100%;
overflow: hidden;
overflow-y: auto;
background-color: @white;
height: auto;
border: 1px solid @borderColor;
z-index: 3;
.item {
display: block;
position: relative;
padding: 4px 8px;
cursor: pointer;
&:hover {
background-color: @hoverBackground;
}
}
.item + .item {
border-top: 1px solid @borderColor;
}
}
}
.input {
&.input-large {
height: 50px;
input {
height: 48px;
font-size: 1.3rem;
padding: 0 10px;
line-height: 48px;
}
.button {
height: 48px;
min-width: 48px;
}
}
}