wux-weapp
Version:
一套组件化、可复用、易扩展的微信小程序 UI 组件库
95 lines (79 loc) • 1.97 kB
text/less
@import "../styles/mixins/index.less";
@import "../styles/themes/index.less";
.@{wux-prefix}-input {
position: relative;
display: flex;
align-items: center;
&__label {
position: relative;
margin-left: 0;
margin-right: @margin-component-base;
text-align: left;
white-space: nowrap;
overflow: hidden;
width: 105px;
&--wrap {
white-space: normal;
}
&--required {
&::before {
display: inline-block;
margin-right: 3px;
color: @assertive;
font-size: 14px;
font-family: SimSun, sans-serif;
line-height: 1;
content: "*";
}
}
}
&__control {
flex: 1;
}
&__item {
width: 100%;
border: 0;
outline: 0;
appearance: none;
background-color: transparent;
font-size: inherit;
color: inherit;
height: 1.47058824em;
min-height: 1.47058824em;
line-height: 1.47058824;
}
&__clear {
display: flex;
}
&__eye {
display: flex;
width: 16px;
height: 16px;
background-repeat: no-repeat;
background-size: contain;
margin-left: @margin-component-base;
.encoded-svg-background(eye, @text-color-secondary);
&--invisible {
.encoded-svg-background(eye_invisible, @text-color-secondary);
}
}
&__error {
display: flex;
margin-left: @margin-component-base;
}
&__extra {
color: @text-color-secondary;
margin-left: @margin-component-base;
}
&--disabled {
opacity: @disabled-opacity;
cursor: not-allowed;
}
&--error &__control {
color: @assertive;
}
// tip: not effective.
&__keyboard-accessory {
max-height: 200px;
}
}