Skip to content

Add exact color-to-variable suggestions and fixes#15

Open
lmn451 wants to merge 1 commit into
masterfrom
codex/exact-color-variable-suggestions
Open

Add exact color-to-variable suggestions and fixes#15
lmn451 wants to merge 1 commit into
masterfrom
codex/exact-color-variable-suggestions

Conversation

@lmn451
Copy link
Copy Markdown
Owner

@lmn451 lmn451 commented Mar 18, 2026

Summary

  • add exact normalized matching from literal colors to workspace CSS custom properties
  • surface matches as replacement completions, informational diagnostics, and quick-fix code actions
  • collect literal colors across supported CSS parsing contexts, including compound values while skipping existing var(...) usages

Implementation details

  • add colorVariableFeature to centralize diagnostic, completion, and code-action generation
  • extend CssVariableManager to index literal color ranges and resolve variables by normalized color
  • extend color parsing to support both modern space-separated color syntax and legacy comma-based alpha forms
  • advertise code action support and add completion trigger characters for literal color editing

Tests

  • add focused coverage for normalized matching, diagnostics, completions, quick fixes, and multi-context parsing
  • run npm test
  • run npm run compile

Notes

  • bd is not installed in the execution environment, so repo-local issue state could not be updated here
  • Linear issue reference is still needed if you want the PR description to comply fully with repo policy

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.

1 participant