VSCodeTriageBot/testissues

TreeItem.iconPath ThemeIcon color might not be overridden

Opened this issue · 0 comments

Does this issue occur when all extensions are disabled?: No

Version: 1.91.1
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22000

Steps to Reproduce:

  1. Create a TreeView with an TreeItem
  2. Set the TreeItem's iconPath to new vscode.ThemeIcon("debug-stackframe", new vscode.ThemeColor("icon.foreground"))
  3. Run the extension. The TreeItem's icon will still be yellow same as in debugging.

After inspecting developer tools, this is likely due to how the icon debug-stackframe's color rule is set to !important. The ThemeColor fails to overwrite it due to low specificity.

This may not only happen with the icon "debug-stackframe" and is affecting customisations of treeitems. Why is some icons' color rules given the !important flag et al? There might not be any easy fix due to this flag's present. I hope the team could look into it, and if possible fix this selector specificity issue (if it won't break vscode, somehow).