magiccube-vue3
Version:
vue3-js版组件库
95 lines (77 loc) • 1.83 kB
text/less
@import './root.css';
@import './theme';
.mc-input{
display: flex;
flex-direction: row;
align-items: center;
position: relative;
width: 100%;
height: @input-height;
border: @input-border;
border-radius: @input-radius;
background-color: @input-background;
&.focus{
border: @input-hover-border;
box-shadow: @input-hover-shadow;
}
&.hover:not(.focus):not(.error):not(.disabled){
border: 1px solid rgba(0, 0, 0, 0.25);
}
&.disabled{
color: @color-font-disabled;
background: #EAEEF3;
border-color: #EAEEF3;
}
&.error {
border-color: var(--mc-error-color);
}
input{
flex: 1;
width: 100%;
height: 100%;
font-size: var(--mc-small-size);
text-indent: 10px;
outline: none;
border: none;
background: none;
// box-sizing: border-box;
&[type=number] {
-moz-appearance: textfield;
}
&[type=number]::-webkit-inner-spin-button,
&[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
&:focus,
&:hover:not(:focus):not(.error):not(:disabled)
{
border: none
}
}
input::-webkit-input-placeholder {
color: @input-placeholder;
}
&__clear{
margin-left: 4px;
margin-right: 10px;
opacity: .5;
cursor: pointer;
&:hover{
opacity: 1;
}
}
&__prefix{
display: flex;
align-items: center;
margin-left: 10px;
}
&__suffix{
display: flex;
align-items: center;
margin-right: 6px;
&:not(.has-clear){
margin-left: 4px;
}
}
}