Skip to content

Commit c89324c

Browse files
authored
Reverse background colors on interactive session (microsoft#178165)
* Reverse background colors on interactive session * Only apply borders to requests
1 parent 233b4e0 commit c89324c

File tree

3 files changed

+16
-26
lines changed

3 files changed

+16
-26
lines changed

build/lib/stylelint/vscode-known-variables.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,8 @@
304304
"--vscode-inputValidation-warningBackground",
305305
"--vscode-inputValidation-warningBorder",
306306
"--vscode-inputValidation-warningForeground",
307-
"--vscode-interactive-responseActiveBackground",
308-
"--vscode-interactive-responseBackground",
309-
"--vscode-interactive-responseBorder",
307+
"--vscode-interactive-requestBackground",
308+
"--vscode-interactive-requestBorder",
310309
"--vscode-interactiveEditor-border",
311310
"--vscode-interactiveEditor-shadow",
312311
"--vscode-interactiveEditorInput-background",
@@ -729,4 +728,4 @@
729728
"--z-index-run-button-container",
730729
"--zoom-factor"
731730
]
732-
}
731+
}

src/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
.interactive-list .monaco-list-row:not(:first-of-type) .interactive-item-container {
7-
border-top: 1px solid var(--vscode-interactive-responseBorder);
8-
}
9-
106
.interactive-list .monaco-list-row .monaco-tl-twistie {
117
/* Hide twisties */
128
display: none !important;
@@ -96,7 +92,7 @@
9692
.interactive-list .interactive-item-container .value table,
9793
.interactive-list .interactive-item-container .value table td,
9894
.interactive-list .interactive-item-container .value table th {
99-
border: 1px solid var(--vscode-interactive-responseBorder);
95+
border: 1px solid var(--vscode-interactive-requestBorder);
10096
border-collapse: collapse;
10197
padding: 4px 6px;
10298
}
@@ -114,9 +110,10 @@
114110
overflow: hidden;
115111
}
116112

117-
.interactive-list .monaco-list-row .interactive-response,
118-
.interactive-list .monaco-list-row .interactive-welcome {
119-
background-color: var(--vscode-interactive-responseBackground);
113+
.interactive-list .monaco-list-row .interactive-request {
114+
background-color: var(--vscode-interactive-requestBackground);
115+
border-bottom: 1px solid var(--vscode-interactive-requestBorder);
116+
border-top: 1px solid var(--vscode-interactive-requestBorder);
120117
}
121118

122119
.interactive-list .monaco-list-row .value {
@@ -218,7 +215,7 @@
218215
right: 10px;
219216
height: 26px;
220217
background-color: var(--vscode-interactive-result-editor-background-color);
221-
border: 1px solid var(--vscode-interactive-responseBorder);
218+
border: 1px solid var(--vscode-interactive-requestBorder);
222219
z-index: 100;
223220
}
224221

@@ -285,7 +282,7 @@
285282
padding: 12px 0px;
286283
display: flex;
287284
flex-direction: column;
288-
border-top: solid 1px var(--vscode-interactive-responseBorder);
285+
border-top: solid 1px var(--vscode-interactive-requestBorder);
289286
}
290287

291288
.interactive-session .interactive-session-followups {

src/vs/workbench/contrib/interactiveSession/common/interactiveSessionColors.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,14 @@ import { localize } from 'vs/nls';
88
import { registerColor } from 'vs/platform/theme/common/colorRegistry';
99

1010

11-
export const interactiveResponseBackground = registerColor(
12-
'interactive.responseBackground',
11+
export const interactiveRequestBackground = registerColor(
12+
'interactive.requestBackground',
1313
{ dark: new Color(new RGBA(255, 255, 255, 0.03)), light: new Color(new RGBA(0, 0, 0, 0.03)), hcDark: null, hcLight: null, },
14-
localize('interactive.responseBackground', 'The resting background color of an interactive response.')
14+
localize('interactive.requestBackground', 'The background color of an interactive request.')
1515
);
1616

17-
export const interactiveResponseActiveBackground = registerColor(
18-
'interactive.responseActiveBackground',
17+
export const interactiveRequestBorder = registerColor(
18+
'interactive.requestBorder',
1919
{ dark: new Color(new RGBA(255, 255, 255, 0.10)), light: new Color(new RGBA(0, 0, 0, 0.10)), hcDark: null, hcLight: null, },
20-
localize('interactive.responseActiveBackground', 'The active background color of an interactive response. Used when the response shows a fade out animation on load.')
21-
);
22-
23-
export const interactiveResponseBorder = registerColor(
24-
'interactive.responseBorder',
25-
{ dark: new Color(new RGBA(255, 255, 255, 0.10)), light: new Color(new RGBA(0, 0, 0, 0.10)), hcDark: null, hcLight: null, },
26-
localize('interactive.responseBorder', 'The border color of an interactive response.')
20+
localize('interactive.requestBorder', 'The border color of an interactive request.')
2721
);

0 commit comments

Comments
 (0)