Files
workspace/code/base-project/base-vue/packages/ao-design/src/textarea/index.scss
T
2025-09-14 21:38:52 +08:00

111 lines
2.1 KiB
SCSS

@use '../_styles/_variables.scss' as *;
@use 'sass:color';
$textarea-prefix: #{$prefix}-textarea;
.#{$textarea-prefix}-wrapper {
box-sizing: border-box;
margin: 0;
padding: 0;
list-style: none;
position: relative;
width: 100%;
.#{$textarea-prefix}-inner {
height: 100%;
width: 100%;
display: flex;
padding: 5px 8px;
border: none;
outline: none;
resize: vertical;
box-sizing: border-box;
font-size: 13px;
transition:
all cubic-bezier(0.38, 0, 0.24, 1) 0.2s,
height 0s;
border: 1px solid $border-color;
border-radius: $border-radius;
background-color: $bg-color-control;
color: $text-color-base;
&::placeholder {
color: $text-color-placeholder;
}
&:hover {
border-color: $primary-color;
}
&:focus-within {
border-color: $primary-color;
box-shadow: 0 0 0 2px $primary-color-focus;
}
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-track {
background: $scroll-track-color;
}
&::-webkit-scrollbar-thumb {
background-color: $scrollbar-color;
border-radius: 0px;
}
&::-webkit-scrollbar-thumb:hover {
background-color: $scrollbar-hover-color;
}
}
.#{$textarea-prefix}-disabled {
background-color: $default-color-disabled;
cursor: not-allowed;
color: $text-color-disabled;
&:hover,
&:focus-within {
border: $border-color;
box-shadow: none;
}
}
.#{$textarea-prefix}-readonly {
// background-color: $bg-color-component-readonly;
}
.#{$textarea-prefix}-clear {
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
width: 18px;
height: 18px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: $text-color-assist;
transition:
color 0.2s,
background-color 0.2s;
&:hover {
background-color: $default-color-hover;
}
}
.#{$textarea-prefix}-count {
position: absolute;
right: 8px;
bottom: 0px;
font-size: 12px;
color: $text-color-assist;
}
}