Skip to content

Commit 921786b

Browse files
kkbrooksjustschen
andauthored
Chat code block pill token updates (#250531)
* update colors for icon labels to meet accessibility color contrast requirements * - update colors for added and removed labels to pass color contrast requirements - added the used tokens to vscode-known-variables * fixing margin-left * update editor gutter colors for added and deleted resources, removed the previously added gitDecoration tokens from known variables * update editor gutter colors for added and deleted lines in dark_modern and updated the fallback colors for editorGutterDeletedBackground * undoing changes to editorGutterAddedBackground and editorGutterDeletedBackground * add foreground colors for added and deleted lines in chat code blocks in chatColors.ts * add chat foreground colors for added and deleted lines in vscode-known-variables.json * rename chat color variables for added and removed lines in chat code block pill --------- Co-authored-by: Justin Chen <54879025+justschen@users.noreply.github.com>
1 parent 669d397 commit 921786b

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
"--vscode-chat-requestCodeBorder",
6060
"--vscode-chat-slashCommandBackground",
6161
"--vscode-chat-slashCommandForeground",
62+
"--vscode-chat-linesAddedForeground",
63+
"--vscode-chat-linesRemovedForeground",
6264
"--vscode-checkbox-background",
6365
"--vscode-checkbox-border",
6466
"--vscode-checkbox-disabled-background",
@@ -957,4 +959,4 @@
957959
"--animation-opacity",
958960
"--chat-setup-dialog-glow-angle"
959961
]
960-
}
962+
}

src/vs/base/browser/ui/iconLabel/iconlabel.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@
6060
}
6161

6262
.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-suffix-container > .label-suffix {
63-
opacity: .7;
63+
color: var(--vscode-peekViewTitleDescription-foreground);
6464
white-space: pre;
6565
}
6666

6767
.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {
68-
opacity: .7;
68+
color: var(--vscode-peekViewTitleDescription-foreground);
6969
margin-left: 0.5em;
7070
font-size: 0.9em;
7171
white-space: pre; /* enable to show labels that include multiple whitespaces */

src/vs/workbench/contrib/chat/browser/media/chatCodeBlockPill.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ span.label-detail {
5858
span.label-added {
5959
font-weight: bold;
6060
padding-left: 4px;
61-
color: var(--vscode-editorGutter-addedBackground);
61+
color: var(--vscode-chat-linesAddedForeground);
6262
}
6363

6464
span.label-removed {
6565
font-weight: bold;
6666
padding-left: 4px;
67-
color: var(--vscode-editorGutter-deletedBackground);
67+
color: var(--vscode-chat-linesRemovedForeground);
6868
}

src/vs/workbench/contrib/chat/common/chatColors.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,13 @@ export const chatEditedFileForeground = registerColor(
5757
export const chatRequestCodeBorder = registerColor('chat.requestCodeBorder', { dark: '#004972B8', light: '#0e639c40', hcDark: null, hcLight: null }, localize('chat.requestCodeBorder', 'Border color of code blocks within the chat request bubble.'), true);
5858

5959
export const chatRequestBubbleBackground = registerColor('chat.requestBubbleBackground', { light: transparent(editorSelectionBackground, 0.3), dark: transparent(editorSelectionBackground, 0.3), hcDark: null, hcLight: null }, localize('chat.requestBubbleBackground', "Background color of the chat request bubble."), true);
60+
61+
export const chatLinesAddedForeground = registerColor(
62+
'chat.linesAddedForeground',
63+
{ dark: '#54B054', light: '#107C10', hcDark: '#54B054', hcLight: '#107C10' },
64+
localize('chat.linesAddedForeground', 'Foreground color of lines added in chat code block pill.'), true);
65+
66+
export const chatLinesRemovedForeground = registerColor(
67+
'chat.linesRemovedForeground',
68+
{ dark: '#FC6A6A', light: '#BC2F32', hcDark: '#F48771', hcLight: '#B5200D' },
69+
localize('chat.linesRemovedForeground', 'Foreground color of lines removed in chat code block pill.'), true);

0 commit comments

Comments
 (0)