amis2/scss/components/form/_textarea.scss
hsm-lv eda10b9eb4
Feat yunshe4.0 style (#2822)
* fix:输入框禁用状态下依然弹出options

* style:升级组件样式到yunshe4.0
2021-11-02 15:50:29 +08:00

71 lines
1.5 KiB
SCSS

.#{$ns}TextareaControl {
position: relative;
> textarea {
@include input-border();
border: 1px solid var(--Form-input-borderColor);
border-radius: var(--Form-input-borderRadius);
background: var(--Form-input-bg);
padding: var(--Form-input-paddingY) var(--Form-input-paddingX);
font-size: var(--Form-input-fontSize);
display: block;
width: 100%;
line-height: var(--Form-input-lineHeight);
outline: none;
resize: none;
&::placeholder {
color: var(--Form-input-placeholderColor);
}
// yunshe4.0
&:hover {
border-color: var(--Form-input-onHover-borderColor);
}
}
& > textarea:focus,
&.is-focused > textarea {
border-color: var(--Form-input-onFocused-borderColor);
box-shadow: var(--Form-input-boxShadow);
// yunshe4.0
&:hover {
border-color: var(--Form-input-onFocused-borderColor);
}
}
&.is-disabled > textarea,
& > textarea[disabled] {
background: $gray200;
color: var(--text--muted-color);
}
&.is-error {
> textarea {
border-color: var(--Form-input-onError-borderColor);
}
}
&-counter {
position: absolute;
right: var(--Form-input-paddingX);
bottom: var(--Form-input-paddingY);
font-size: var(--fontSizeSm);
padding: 0 5px;
border-radius: 3px;
color: #fff;
background: rgba(0, 0, 0, 0.6);
&.is-empty {
color: #666;
background: rgba(0, 0, 0, 0.4);
}
}
.has-error--maxLength &-counter {
background: var(--danger);
}
}