WeUI v2.3.0 解读 44 form_common
返回
1 form_common
::-webkit-outer-spin-button
::-webkit-inner-spin-button
// file: src/style/widget/weui-cell/weui-form/weui-form_common.less
@import "../../../base/fn";
.weui-label {
display: block;
width: @weuiCellLabelWidth;
.text_wrap();
}
.weui-input {
width: 100%;
border: 0;
outline: 0;
-webkit-appearance: none;
background-color: transparent;
font-size: inherit;
color: inherit;
height: unit(@weuiCellLineHeight, em);
line-height: @weuiCellLineHeight;
// hides the spin-button
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
&:focus {
&:not(:placeholder-shown) {
& + .weui-btn_input-clear {
display: inline;
}
}
}
}
.weui-input::placeholder,
.weui-input__placeholder {
color: var(--weui-FG-2);
}
.weui-textarea {
display: block;
border: 0;
resize: none;
background: transparent;
width: 100%;
color: inherit;
font-size: 1em;
line-height: inherit;
outline: 0;
}
.weui-textarea-counter {
color: @weuiTextColorTips;
text-align: right;
font-size: 14px;
.weui-cell_warn & {
color: @weuiTextColorWarn;
}
}
.weui-cells_form {
.weui-cell_switch,
.weui-cell_vcode,
.weui-cell_readonly,
.weui-cell_disabled {
&:active {
background-color: transparent;
}
}
.weui-cell__ft {
font-size: 0;
}
.weui-icon-warn {
display: none;
}
input,
textarea,
label[for] {
.setTapColor();
}
}
.weui-cell_warn {
color: @weuiTextColorWarn;
.weui-icon-warn { display: inline-block; }
}
.weui-cell_readonly,
.weui-cell_disabled {
.weui-input,
.weui-textarea {
&:disabled {
opacity: 1;
-webkit-text-fill-color: @weuiTextColorDesc;
}
&[disabled],
&[readonly] {
color: @weuiTextColorDesc;
}
}
}
.weui-btn_input-clear {
display: none;
padding-left: 8px;
[class*="weui-icon-"] {
width: 18px;
}
}