Skip to content

Conversation

@Tyriar
Copy link
Member

@Tyriar Tyriar commented Jan 11, 2026

The problem was nested rules and multiple classes weren't supported properly.

Fixes #238859

The problem was nested rules and multiple classes weren't supported
properly.

Fixes #238859
@Tyriar Tyriar added this to the January 2026 milestone Jan 11, 2026
@Tyriar Tyriar self-assigned this Jan 11, 2026
Copilot AI review requested due to automatic review settings January 11, 2026 07:34
@Tyriar Tyriar moved this to In Review in VS Code Editor GPU Renderer Jan 11, 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 fixes ghost text color rendering in the GPU-accelerated editor by improving the CSS rule extraction logic to properly handle nested CSS rules and multiple space-separated class names.

Changes:

  • Added support for extracting CSS rules when className contains multiple space-separated classes
  • Implemented recursive extraction of nested CSS rules (CSS nesting support)
  • Updated the regex pattern to recognize chained class selectors (e.g., .class1.class2)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vs/editor/browser/gpu/css/decorationCssRuleExtractor.ts Refactored rule extraction into a recursive _collectMatchingRules method; added support for space-separated class names and nested rules; updated regex to include . for chained selectors
src/vs/editor/test/browser/gpu/decorationCssRulerExtractor.test.ts Added tests for pseudo-class selectors and multiple space-separated class names
Comments suppressed due to low confidence (1)

src/vs/editor/test/browser/gpu/decorationCssRulerExtractor.test.ts:115

  • The PR description mentions fixing support for "nested rules" but there's no test case covering CSS nesting (e.g., .parent { .child { color: red; } }). Consider adding a test to verify that nested CSS rules are properly extracted, especially since lines 94-97 in the implementation specifically handle this case.
	});

@Tyriar Tyriar merged commit 259e0f4 into main Jan 11, 2026
27 of 28 checks passed
@Tyriar Tyriar deleted the tyriar/238859 branch January 11, 2026 08:07
@github-project-automation github-project-automation bot moved this from In Review to Done in VS Code Editor GPU Renderer Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Editor GPU: Ghost text is regular foreground color

3 participants