Skip to content

Commit 8b69774

Browse files
themes: fix match highlight contrast in focused quick pick rows (2026 themes) (#314117)
* themes: fix match highlight contrast in focused quick pick rows Add list.focusHighlightForeground: #FFFFFF to the 2026 Dark and 2026 Light themes so search match highlights remain legible against the saturated blue focused row background introduced in #313740. The original list.highlightForeground (blue) is preserved for unfocused rows, retaining the prior accessibility fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use quick-pick-specific token for focused match highlights Address review: instead of overriding the global `list.focusHighlightForeground` (which would impact all lists/trees in the workbench, including those with light tinted focus backgrounds in 2026 Light), introduce a new `quickInputList.focusHighlightForeground` color token scoped to the quick pick. Update quickInput.css to use the new token and set it to white in the 2026 Dark and 2026 Light themes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d72513b commit 8b69774

5 files changed

Lines changed: 9 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,7 @@
621621
"--vscode-quickInput-list-focusBackground",
622622
"--vscode-quickInputList-focusBackground",
623623
"--vscode-quickInputList-focusForeground",
624+
"--vscode-quickInputList-focusHighlightForeground",
624625
"--vscode-quickInputList-focusIconForeground",
625626
"--vscode-quickInputTitle-background",
626627
"--vscode-radio-activeBackground",

extensions/theme-defaults/themes/2026-dark.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@
231231
"quickInputList.focusBackground": "#297AA0",
232232
"quickInputList.focusForeground": "#FFFFFF",
233233
"quickInputList.focusIconForeground": "#FFFFFF",
234+
"quickInputList.focusHighlightForeground": "#FFFFFF",
234235
"quickInputList.hoverBackground": "#262728",
235236
"terminal.selectionBackground": "#3994BC33",
236237
"terminal.background": "#191A1B",

extensions/theme-defaults/themes/2026-light.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@
235235
"quickInputList.focusBackground": "#0069CC",
236236
"quickInputList.focusForeground": "#FFFFFF",
237237
"quickInputList.focusIconForeground": "#FFFFFF",
238+
"quickInputList.focusHighlightForeground": "#FFFFFF",
238239
"quickInputList.hoverBackground": "#EDF0F5",
239240
"terminal.selectionBackground": "#0069CC26",
240241
"terminalCursor.foreground": "#202020",

src/vs/platform/quickinput/browser/media/quickInput.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@
303303

304304
/* preserve list-like styling instead of tree-like styling */
305305
.quick-input-list .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight {
306-
color: var(--vscode-list-focusHighlightForeground) !important;
306+
color: var(--vscode-quickInputList-focusHighlightForeground) !important;
307307
}
308308

309309
.quick-input-list .quick-input-list-entry .quick-input-list-separator {

src/vs/platform/theme/common/colors/quickpickColors.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { registerColor, oneOf } from '../colorUtils.js';
1111

1212
// Import the colors we need
1313
import { editorWidgetBackground, editorWidgetForeground } from './editorColors.js';
14-
import { listActiveSelectionBackground, listActiveSelectionForeground, listActiveSelectionIconForeground } from './listColors.js';
14+
import { listActiveSelectionBackground, listActiveSelectionForeground, listActiveSelectionIconForeground, listFocusHighlightForeground } from './listColors.js';
1515

1616

1717
export const quickInputBackground = registerColor('quickInput.background',
@@ -49,3 +49,7 @@ export const quickInputListFocusIconForeground = registerColor('quickInputList.f
4949
export const quickInputListFocusBackground = registerColor('quickInputList.focusBackground',
5050
{ dark: oneOf(_deprecatedQuickInputListFocusBackground, listActiveSelectionBackground), light: oneOf(_deprecatedQuickInputListFocusBackground, listActiveSelectionBackground), hcDark: null, hcLight: null },
5151
nls.localize('quickInput.listFocusBackground', "Quick picker background color for the focused item."));
52+
53+
export const quickInputListFocusHighlightForeground = registerColor('quickInputList.focusHighlightForeground',
54+
listFocusHighlightForeground,
55+
nls.localize('quickInput.listFocusHighlightForeground', "Quick picker foreground color of the match highlights on the focused item."));

0 commit comments

Comments
 (0)