Skip to content

Commit 1cebf9e

Browse files
Support light theme and minor UI Fixes (AST-115631) (#1293)
* Update CSS to support the UI light theme * Update sca.css * Updates css * updated css and images to supoort UI in light theme * updated images * OnThemeChange event diplayed different codebashing UI * fixed compilation error * Update riskManagement.css * updated package version to fix med vulnerability --------- Co-authored-by: Anurag Dalke <[email protected]>
1 parent 3a3fa75 commit 1cebf9e

File tree

14 files changed

+686
-223
lines changed

14 files changed

+686
-223
lines changed

media/auth.css

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ body {
1919
width: 100%;
2020
}
2121

22+
body[data-vscode-theme-kind="vscode-high-contrast"] {
23+
24+
.auth-container {
25+
background: #3c3c3c
26+
}
27+
.auth-button{
28+
background: #0e639c
29+
}
30+
}
31+
2232
.auth-form{
2333
position: relative;
2434
}
@@ -46,7 +56,7 @@ body {
4656
width: 100%;
4757
height: 27px;
4858
padding: 8px;
49-
border: 1px solid var(--vscode-input-border);
59+
border: 1px solid var(--vscode-input-foreground);
5060
border-radius: 7px;
5161
background: var(--vscode-input-background);
5262
color: var(--vscode-input-foreground);
@@ -122,8 +132,6 @@ body {
122132
z-index: 1000;
123133
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
124134
display: none;
125-
color: #B5B5B5;
126-
filter: brightness(1.5);
127135
padding:5px;
128136
}
129137

@@ -138,10 +146,6 @@ body {
138146
font-size: 13px;
139147
}
140148

141-
.autocomplete-items .autocomplete-item:hover {
142-
color: white;
143-
}
144-
145149
.autocomplete-items .autocomplete-item i {
146150
margin-left: 10px;
147151
color: #0d6efd;

media/details.css

Lines changed: 109 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}
3838

3939
.division {
40-
border-top: 1px solid var(--vscode-input-background);
40+
border-top: 1px solid var(--vscode-input-foreground);
4141
border-radius: 1px;
4242
margin: 0.5em 0em 0.5em 0em;
4343
opacity: 40%;
@@ -61,9 +61,6 @@
6161
padding-bottom: 0.5em;
6262
}
6363

64-
.details-table tr {
65-
background-color: var(--vscode-input-background);
66-
}
6764

6865
.details-table tr > td:nth-child(2) {
6966
border-left: 2px solid transparent;
@@ -81,10 +78,9 @@
8178

8279
.select-critical {
8380
margin: 0.4em;
84-
border-color: transparent;
81+
border-color: var(--vscode-input-foreground);
8582
border-radius: 4px;
8683
padding: 0.2em 0.5em 0.2em 1.5em;
87-
background-color: var(--vscode-input-background);
8884
background-image: url("./icons/critical_untoggle.svg");
8985
background-repeat: no-repeat;
9086
background-size: 0.8em auto;
@@ -95,10 +91,9 @@
9591

9692
.select-high {
9793
margin: 0.4em;
98-
border-color: transparent;
94+
border-color: var(--vscode-input-foreground);
9995
border-radius: 4px;
10096
padding: 0.2em 0.5em 0.2em 1.5em;
101-
background-color: var(--vscode-input-background);
10297
background-image: url("./icons/high_untoggle.svg");
10398
background-repeat: no-repeat;
10499
background-size: 0.8em auto;
@@ -109,10 +104,9 @@
109104

110105
.select-medium {
111106
margin: 0.4em;
112-
border-color: transparent;
107+
border-color: var(--vscode-input-foreground);
113108
border-radius: 4px;
114109
padding: 0.2em 0.5em 0.2em 1.5em;
115-
background-color: var(--vscode-input-background);
116110
background-image: url("./icons/medium_untoggle.svg");
117111
background-repeat: no-repeat;
118112
background-size: 0.8em auto;
@@ -123,10 +117,9 @@
123117

124118
.select-info {
125119
margin: 0.4em;
126-
border-color: transparent;
120+
border-color: var(--vscode-input-foreground);
127121
border-radius: 4px;
128122
padding: 0.2em 0.5em 0.2em 1.5em;
129-
background-color: var(--vscode-input-background);
130123
background-image: url("./icons/info_untoggle.svg");
131124
background-repeat: no-repeat;
132125
background-size: 0.8em auto;
@@ -137,10 +130,9 @@
137130

138131
.select-low {
139132
margin: 0.4em;
140-
border-color: transparent;
133+
border-color: var(--vscode-input-foreground);
141134
border-radius: 4px;
142135
padding: 0.2em 0.5em 0.2em 1.5em;
143-
background-color: var(--vscode-input-background);
144136
background-image: url("./icons/low_untoggle.svg");
145137
background-repeat: no-repeat;
146138
background-size: 0.8em auto;
@@ -151,10 +143,9 @@
151143

152144
.state {
153145
margin: 0.4em;
154-
border-color: transparent;
146+
border-color: var(--vscode-input-foreground);
155147
border-radius: 4px;
156148
padding: 0.2em 0.5em 0.2em 1.5em;
157-
background-color: var(--vscode-input-background);
158149
background-image: url("./icons/state.png");
159150
background-repeat: no-repeat;
160151
background-size: 0.8em auto;
@@ -165,7 +156,7 @@
165156

166157
.comment {
167158
margin: 0.4em;
168-
border-color: transparent;
159+
border-color: var(--vscode-input-foreground);
169160
border-radius: 4px;
170161
padding: 0.2em 0.5em 0.2em 1.5em;
171162
background-color: var(--vscode-input-background);
@@ -192,7 +183,6 @@
192183
border-color: transparent;
193184
border-radius: 4px;
194185
padding: 0.2em 0.5em 0.2em 1.5em;
195-
background-color: var(--vscode-input-background);
196186
background-image: url("./icons/status.png");
197187
background-repeat: no-repeat;
198188
background-size: 0.8em auto;
@@ -206,11 +196,11 @@
206196
border-color: transparent;
207197
border-radius: 4px;
208198
padding: 0.2em 0.5em 0.2em 1.5em;
209-
background-image: url("./icons/status.png");
210-
background-repeat: no-repeat;
211-
background-size: 0.8em auto;
212-
background-position: 0.4em center;
213-
color: var(--vscode-foreground);
199+
background-image: url("./icons/status.png") !important;
200+
background-repeat: no-repeat !important;
201+
background-size: 0.8em auto !important;
202+
background-position: 0.4em center !important;
203+
color: #cccccc;
214204
}
215205

216206
input { display: none; }
@@ -253,7 +243,7 @@ input ~ .tab {
253243
}
254244

255245
.comments{
256-
border-color: transparent;
246+
border-color: var(--vscode-input-foreground);
257247
border-radius: 4px;
258248
padding: 0.2em 0.5em 0.2em 0.2em;
259249
background-color:var(--vscode-input-background) ;
@@ -267,12 +257,96 @@ input ~ .tab {
267257
cursor: pointer;
268258
}
269259

270-
.history-container{
260+
.history-container {
271261
margin-top: 1em;
272-
background-color:var(--vscode-input-background) ;
273262
padding: 0.5em;
274263
}
275264

265+
#askGroup textarea{
266+
background-color: var(--vscode-input-background) !important;
267+
color: var(--vscode-foreground) !important;
268+
}
269+
270+
#askGroup button{
271+
background-color: var(--vscode-input-background) !important;
272+
color: var(--vscode-foreground) !important;
273+
border-style :solid !important;
274+
}
275+
276+
#askGroup textarea:focus {
277+
border-style: solid !important;
278+
border-color: var(--vscode-focusBorder) !important; /* matches VS Code focus outline */
279+
outline: none !important; /* prevents double focus outlines */
280+
box-shadow: 0 0 0 2px var(--vscode-focusBorder)40; /* optional soft glow */
281+
}
282+
283+
284+
#askGroup textarea::placeholder {
285+
color: var(--vscode-input-placeholderForeground) !important;
286+
opacity: 1 !important;
287+
}
288+
289+
body[data-vscode-theme-kind*="dark"] {
290+
.history-container,
291+
.select-critical,
292+
.select-high,
293+
.select-medium,
294+
.select-info,
295+
.select-low,
296+
.state,
297+
.comment,
298+
.submit,
299+
.details-table tr{
300+
background-color: var(--vscode-input-background);
301+
}
302+
303+
button:hover {
304+
background: var(--vscode-button-hoverBackground);
305+
}
306+
}
307+
308+
body[data-vscode-theme-kind="vscode-high-contrast"] {
309+
.history-container,
310+
.select-critical,
311+
.select-high,
312+
.select-medium,
313+
.select-info,
314+
.select-low,
315+
.state,
316+
.comment,
317+
.submit,
318+
.details-table tr{
319+
background-color: rgb(54 53 53);
320+
}
321+
322+
button:hover {
323+
background-color: #1177bb !important;
324+
}
325+
}
326+
327+
body[data-vscode-theme-kind*="light"],
328+
body[data-vscode-theme-kind*="vscode-light-high-contrast"] {
329+
.history-container,
330+
.select-critical,
331+
.select-high,
332+
.select-medium,
333+
.select-info,
334+
.select-low,
335+
.state,
336+
.comment,
337+
.submit,
338+
.details-table tr{
339+
background-color: rgb(245, 245, 245);
340+
}
341+
342+
button:hover {
343+
background: var(--vscode-button-hoverBackground);
344+
}
345+
}
346+
347+
#headingOne button:hover{
348+
color: #fff !important;
349+
}
276350
.history-container:hover{
277351
border-left: 2px solid var(--vscode-input-foreground);
278352
}
@@ -414,4 +488,13 @@ input ~ .tab {
414488

415489
.code-sample{
416490
white-space: pre-wrap;
491+
}
492+
493+
body.vscode-high-contrast code {
494+
background: rgba(255, 255, 255, 0.1) !important;
495+
}
496+
497+
/* For VS Code Light High Contrast theme */
498+
body.vscode-high-contrast-light.vscode-high-contrast code{
499+
background: rgba(0, 0, 0, 0.1) !important;
417500
}

media/icons/cxAIError_light.svg

Lines changed: 9 additions & 0 deletions
Loading

media/icons/double-check_light.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)