Skip to content

Fix Modern UI editor tab decoration color on full label - #325291

Merged
Hawk Ticehurst (hawkticehurst) merged 5 commits into
microsoft:mainfrom
cipheraxat:fix/325246-modern-ui-tab-decoration-color
Jul 10, 2026
Merged

Hawk Ticehurst (hawkticehurst) merged 5 commits into
microsoft:mainfrom
cipheraxat:fix/325246-modern-ui-tab-decoration-color

Conversation

@cipheraxat

@cipheraxat Akshat Anand (cipheraxat) commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #325246

Summary

With Modern UI (workbench.experimental.modernUI) enabled, file decoration colors (e.g. git modified / problem colors) no longer tint the editor tab filename. Badges still show the decoration color, but the label text is forced to the normal foreground.

Root cause: Modern UI style overrides in tabs.css set:

.tab.active .tab-label a { color: var(--vscode-foreground) !important; }
.tab:not(.active) .tab-label a { color: color-mix(...) !important; }

Those rules override the decoration color class applied to .monaco-icon-label (monaco-decoration-itemColor-*), so only badge ::after colors remain visible.

Changes

  • Exclude labels that carry a monaco-decoration-itemColor-* class from the forced Modern UI tab label colors.
  • Explicitly inherit the decoration color onto the label name, description, and highlighted label so the entire tab label is tinted, matching classic UI.

How to Test

  1. Enable "workbench.experimental.modernUI": true.
  2. Ensure "workbench.editor.decorations.colors": true (default).
  3. Open a git-modified file (and/or a file with problems) so the tab has decoration badges.
  4. Compare the active/inactive tab label text color with Modern UI off.

Before: filename stays normal foreground; only badges are decoration-colored.
After: the full tab label text uses the decoration color, same as classic UI.

Modern UI style overrides forced tab label link colors with !important, which overrode file decoration colors so only badges stayed tinted. Skip decorated labels and inherit the decoration color across the full tab label.

Co-authored-by: Cursor <[email protected]>
Copilot AI review requested due to automatic review settings July 10, 2026 12:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Modern UI editor tabs so file-decoration colors tint the complete label, matching classic UI.

Changes:

  • Excludes decorated labels from forced active/inactive foreground colors.
  • Propagates decoration color across label elements.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you!

@cipheraxat

Copy link
Copy Markdown
Contributor Author

Thanks Hawk Ticehurst (@hawkticehurst) for the review and approval!

@hawkticehurst
Hawk Ticehurst (hawkticehurst) merged commit 2df67b3 into microsoft:main Jul 10, 2026
29 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.129.0 milestone Jul 10, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Aug 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modern UI: Editor tab decoration color doesn't get applied to entire tab label

5 participants