Skip to content

Commit e0ba0fc

Browse files
authored
fix: correct the style of input and select (#578)
1 parent d80f587 commit e0ba0fc

File tree

4 files changed

+33
-21
lines changed

4 files changed

+33
-21
lines changed

src/components/input/style.scss

+13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#{$input} {
44
background-color: var(--input-background);
55
border: 1px solid transparent;
6+
border-color: var(--input-border);
67
color: var(--input-foreground);
78
display: inline-block;
89
font-size: 13px;
@@ -33,4 +34,16 @@
3334
text-align: right;
3435
}
3536
}
37+
38+
&::placeholder {
39+
color: var(--input-placeholderForeground);
40+
}
41+
42+
&:focus,
43+
&:active {
44+
border-color: var(--focusBorder);
45+
outline-color: var(--focusBorder);
46+
outline-offset: -1;
47+
outline-style: solid;
48+
}
3649
}

src/components/select/style.scss

+14-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
&__input {
2020
appearance: none;
21-
background: inherit;
21+
background: var(--input-background);
2222
border: 0;
23-
color: inherit;
23+
color: var(--input-foreground);
2424
cursor: default;
2525
font: inherit;
2626
font-size: inherit;
@@ -33,6 +33,18 @@
3333
&:focus {
3434
outline: none;
3535
}
36+
37+
&::placeholder {
38+
color: var(--input-placeholderForeground);
39+
}
40+
41+
&:focus,
42+
&:active {
43+
border-color: var(--focusBorder);
44+
outline-color: var(--focusBorder);
45+
outline-offset: -1;
46+
outline-style: solid;
47+
}
3648
}
3749

3850
&__arrow {

src/workbench/sidebar/explore/style.scss

+6
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
background: rgba(0, 0, 0, 0.3);
2929

3030
#{$folderTree}--input {
31+
background: var(--input-background);
3132
border: 1px solid var(--list-focusOutline);
33+
color: var(--input-foreground);
3234
font-family: inherit;
3335
font-size: 13px;
3436
height: 20px;
@@ -48,6 +50,10 @@
4850
&::selection {
4951
background: rgb(90, 126, 167);
5052
}
53+
54+
&::placeholder {
55+
color: var(--input-placeholderForeground);
56+
}
5157
}
5258
}
5359
}

src/workbench/style.scss

-19
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,6 @@
88
background-color: var(--editor-selectionBackground);
99
}
1010

11-
input,
12-
select {
13-
background: var(--input-background);
14-
border-color: var(--input-border);
15-
color: var(--input-foreground);
16-
17-
&::placeholder {
18-
color: var(--input-placeholderForeground);
19-
}
20-
}
21-
22-
input:focus,
23-
input:active {
24-
border-color: var(--focusBorder);
25-
outline-color: var(--focusBorder);
26-
outline-offset: -1;
27-
outline-style: solid;
28-
}
29-
3011
code {
3112
background: var(--textCodeBlock-background);
3213
}

0 commit comments

Comments
 (0)