Skip to content

Commit

Permalink
feat(textarea): support borderless
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 committed Nov 19, 2024
1 parent 483aae0 commit 2e22f97
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions style/web/components/textarea/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@
position: relative;
width: 100%;

// borderless mode
&--borderless:not(&--focused) {
border-color: transparent;
transition: @textarea-inner-transition;

&:hover {
border-color: @component-border;
background-color: @bg-color-container-hover;
cursor: pointer;
}

&.@{prefix}-is-disabled {
border: none;
background-color: @textarea-bg-color-disabled;
}
}

&__inner {
display: flex;
width: 100%;
Expand Down
3 changes: 3 additions & 0 deletions style/web/components/textarea/_var.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@
@textarea-box-shadow-color-error-focus: @error-color-focus;

@textarea-border-radius: @border-radius-default;

// 动画
@textarea-inner-transition: border @anim-time-fn-easing @anim-duration-base, box-shadow @anim-time-fn-easing @anim-duration-base, background-color @anim-time-fn-easing @anim-duration-base;

0 comments on commit 2e22f97

Please sign in to comment.