Skip to content

Commit d35c051

Browse files
authored
feat(input): input component adapts to dark theme (#2948)
1 parent 187ab54 commit d35c051

File tree

2 files changed

+2
-70
lines changed

2 files changed

+2
-70
lines changed

packages/theme/src/input/index.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@
285285
top: 50%;
286286
left: 0;
287287
transform: translateY(-50%);
288+
color: var(--tv-Input-text-color);
288289
max-width: 100%;
289290
text-overflow: ellipsis;
290291
overflow: hidden;

packages/theme/src/textarea/index.less

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,6 @@
2828
vertical-align: bottom;
2929
font-size: var(--tv-Textarea-font-size);
3030

31-
&:before {
32-
content: '';
33-
width: calc(100% - 20px);
34-
height: 8px;
35-
position: absolute;
36-
left: 2px;
37-
top: 1px;
38-
z-index: 1;
39-
background: #fff;
40-
border-radius: var(--tv-Textarea-border-radius);
41-
}
42-
43-
&:after {
44-
content: '';
45-
width: calc(100% - 20px);
46-
height: 16px;
47-
position: absolute;
48-
left: 2px;
49-
bottom: 1px;
50-
z-index: 1;
51-
background: #fff;
52-
border-radius: var(--tv-Textarea-border-radius);
53-
}
54-
5531
&.is-disabled &__inner {
5632
background-color: var(--tv-Textarea-disabled-bg-color);
5733
border-color: var(--tv-Textarea-disabled-border-color);
@@ -61,16 +37,6 @@
6137
}
6238

6339
&.is-disabled {
64-
background-color: var(--tv-Textarea-disabled-bg-color);
65-
66-
&:before {
67-
background-color: var(--tv-Textarea-disabled-bg-color);
68-
}
69-
70-
&:after {
71-
background-color: var(--tv-Textarea-disabled-bg-color);
72-
}
73-
7440
&:hover {
7541
border-color: var(--tv-Textarea-disabled-border-color);
7642
}
@@ -180,32 +146,6 @@
180146
}
181147

182148
&.is-display-only {
183-
.@{textarea-prefix-cls}-display-only.@{textarea-prefix-cls}__inner-con
184-
.@{textarea-prefix-cls}-display-only__content,
185-
.@{textarea-prefix-cls}-autosize-display-only.@{textarea-prefix-cls}__inner-con
186-
.@{textarea-prefix-cls}-display-only__content {
187-
position: relative;
188-
left: 0;
189-
max-width: 100%;
190-
text-overflow: ellipsis;
191-
display: -webkit-box;
192-
/* autoprefixer: ignore next */
193-
-webkit-box-orient: vertical;
194-
-webkit-line-clamp: 1;
195-
overflow: hidden;
196-
word-wrap: break-word;
197-
white-space: pre-wrap;
198-
line-height: 1.5;
199-
}
200-
201-
&:before {
202-
display: none;
203-
}
204-
205-
&:after {
206-
display: none;
207-
}
208-
209149
.@{textarea-prefix-cls}__inner-con {
210150
height: auto;
211151

@@ -221,10 +161,10 @@
221161

222162
.@{textarea-prefix-cls}-display-only__content {
223163
left: 0;
164+
color: var(--tv-Textarea-text-color);
224165
max-width: 100%;
225166
text-overflow: ellipsis;
226167
display: -webkit-box;
227-
/* autoprefixer: ignore next */
228168
-webkit-box-orient: vertical;
229169
-webkit-line-clamp: 5;
230170
overflow: hidden;
@@ -250,15 +190,6 @@
250190
}
251191
}
252192

253-
.@{textarea-prefix-cls}-autosize-display-only {
254-
.@{textarea-prefix-cls}-display-only__content {
255-
left: 0;
256-
max-width: 100%;
257-
position: absolute;
258-
white-space: pre-line;
259-
line-height: 1.5;
260-
}
261-
}
262193
.@{textarea-prefix-cls}__inner {
263194
height: 0;
264195
padding: 0;

0 commit comments

Comments
 (0)