fix(web): accept case-insensitive VS Code color functions - #7660
fix(web): accept case-insensitive VS Code color functions#7660jonbaldie wants to merge 1 commit into
Conversation
VS Code theme imports rejected uppercase CSS color() function names because the dispatch guard was case-sensitive while the parser accepted case-insensitive syntax. Match the guard to the parser and cover the uppercase form with a regression test.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This PR adds stricter validation for CSS color() function parsing in VS Code theme imports - rejecting malformed notation and supporting case-insensitive function names. The changes are self-contained with corresponding tests and don't affect behavior for valid inputs. You can add or adjust custom eligibility rules. Learn more. |
Dismissing prior approval to re-evaluate de6184f
de6184f to
cbfa0f2
Compare
What Changed
Accept uppercase and mixed-case CSS
color()function names when importing VS Code themes, with a focused regression test.Why
The importer’s dispatch guard was case-sensitive even though its
color()parser accepts case-insensitive syntax. A valid theme usingCOLOR(SRGB …)was rejected as missing an editor background.UI Changes
Not applicable.
Checklist
Model and harness: GPT-5 Codex.
Note
Fix case-insensitive
color()parsing inparseVsCodeColorUpdates
parseVsCodeColorin vscodeThemeImport.ts to use a case-insensitive regex for CSScolor()notation instead ofstartsWith("color("). This fixes parsing of theme values using uppercase variations like `COLOR(SRGB ...)", and adds a corresponding test case.Macroscope summarized cbfa0f2.