Skip to content

Enhance Modern UI editor tab styles and color customizations - #330818

Merged
Lee Murray (mrleemurray) merged 2 commits into
mainfrom
mrleemurray/compulsory-plum-dingo
Aug 14, 2026
Merged

Lee Murray (mrleemurray) merged 2 commits into
mainfrom
mrleemurray/compulsory-plum-dingo

Conversation

@mrleemurray

@mrleemurray Lee Murray (mrleemurray) commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

This pull request introduces a new set of color tokens specifically for modern editor tabs, separating them from the existing modern tab tokens. This allows for more granular theming of editor tabs in the modern UI, with dedicated color variables for different editor tab states (active, hover, inactive, etc.). The changes update the theme registration, documentation, CSS variables, and sample theme JSON to use these new tokens, and remove the now-obsolete modern tab action color tokens.

Modern Editor Tab Color Tokens

  • Added new color registrations for modernEditorTab.* in theme.ts, covering active, hover, inactive, and action backgrounds/foregrounds for editor tabs, and removed the old modernTab.*ActionBackground tokens.

Theme Variable and CSS Updates

  • Updated CSS custom properties in tabs.css to use the new --vscode-modernEditorTab-* variables for editor tab backgrounds, foregrounds, and action backgrounds, ensuring the UI uses the new tokens. [1] [2]
  • Added new CSS rules for hover and action states using the new variables, including support for active and unfocused editor tab states. [1] [2] [3]

Documentation and Theme Sample Updates

  • Updated the style overrides README to document the new modernEditorTab.* tokens, removed references to obsolete modernTab.*ActionBackground tokens, and provided an updated example theme JSON using the new tokens. [1] [2] [3]

Stylelint and Variable Tracking

  • Updated vscode-known-variables.json to add the new --vscode-modernEditorTab-* variables and remove the obsolete --vscode-modernTab-*ActionBackground entries. [1] [2] [3]

Test Imports

  • Added a missing import for Color in the style overrides test file to support color-related test cases.

- Introduced new color variables for modern editor tabs, including active, hover, and inactive states.
- Updated README documentation to reflect new color variables and their descriptions.
- Modified CSS to apply new styles for modern editor tabs, ensuring consistent hover and action backgrounds.
- Enhanced test cases to validate the new editor tab color customizations and their precedence over legacy colors.
- Refactored color resolution logic to accommodate new modern editor tab colors.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings August 14, 2026 09:46
@mrleemurray
Lee Murray (mrleemurray) enabled auto-merge (squash) August 14, 2026 09:46

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

Adds editor-specific Modern UI tab colors while preserving shared pane-tab styling.

Changes:

  • Registers editor-tab colors for active, inactive, hover, and action states.
  • Updates CSS color resolution and legacy customization handling.
  • Expands documentation, tests, and stylelint variables.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/vs/workbench/services/themes/browser/modernTabColorCustomizations.ts Resolves legacy colors against new editor-specific colors.
src/vs/workbench/contrib/styleOverrides/test/browser/styleOverrides.contribution.test.ts Tests registrations, precedence, and derived styles.
src/vs/workbench/contrib/styleOverrides/README.md Documents the new color IDs.
src/vs/workbench/contrib/styleOverrides/browser/media/tabs.css Applies new colors to editor-tab states.
src/vs/workbench/common/theme.ts Registers the editor-tab color tokens.
build/lib/stylelint/vscode-known-variables.json Allows the new CSS variables.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/vs/workbench/common/theme.ts Resolved
@benibenj

Copy link
Copy Markdown
Contributor

Copilot can you create some component fixtures for the tab bar which show off how setting the different tabs related theme colors look/are rendered. You can do multiple colors in one fixture if it makes sense.

@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 9e99bb13 Current: 3e8662c7

Added (8)

editor/editorTabBar/editorTabBar/ModernUIOn/ThemeColors/TabStates/Dark

current

editor/editorTabBar/editorTabBar/ModernUIOn/ThemeColors/TabStates/Light

current

editor/editorTabBar/editorTabBar/ModernUIOn/ThemeColors/ActiveAction/Dark

current

editor/editorTabBar/editorTabBar/ModernUIOn/ThemeColors/ActiveAction/Light

current

editor/editorTabBar/editorTabBar/ModernUIOn/ThemeColors/ActiveHover/Dark

current

editor/editorTabBar/editorTabBar/ModernUIOn/ThemeColors/ActiveHover/Light

current

editor/editorTabBar/editorTabBar/ModernUIOn/ThemeColors/SelectedAction/Dark

current

editor/editorTabBar/editorTabBar/ModernUIOn/ThemeColors/SelectedAction/Light

current

@mrleemurray
Lee Murray (mrleemurray) merged commit 515e7a1 into main Aug 14, 2026
27 checks passed
@mrleemurray
Lee Murray (mrleemurray) deleted the mrleemurray/compulsory-plum-dingo branch August 14, 2026 11:34
@vs-code-engineering vs-code-engineering Bot added this to the 1.134.0 milestone Aug 14, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Sep 28, 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.

5 participants