Skip to content

Improve CSS handling on theme change#298011

Merged
mrleemurray merged 2 commits intomainfrom
mrleemurray/voiceless-plum-moth
Feb 27, 2026
Merged

Improve CSS handling on theme change#298011
mrleemurray merged 2 commits intomainfrom
mrleemurray/voiceless-plum-moth

Conversation

@mrleemurray
Copy link
Contributor

Enhance the CSS management during theme changes by ensuring that cached stylesheets are cleared when a theme is no longer active. This prevents outdated styles from being applied and maintains the integrity of the user interface.

Copilot AI review requested due to automatic review settings February 26, 2026 14:43
@mrleemurray mrleemurray self-assigned this Feb 26, 2026
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 26, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances CSS management during theme changes by ensuring that cached stylesheets are properly cleared when a theme becomes inactive. The changes prevent outdated styles from persisting and improve the reliability of theme switching.

Changes:

  • Added cleanup logic to remove cached CSS when an extension's theme becomes inactive during extension handling
  • Refactored the onThemeChange() method to separate activation and deactivation logic
  • Added comprehensive deactivation sweep to clear all inactive extension stylesheets

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mrleemurray mrleemurray merged commit 7e715cd into main Feb 27, 2026
20 checks passed
@mrleemurray mrleemurray deleted the mrleemurray/voiceless-plum-moth branch February 27, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants