Skip to content

fix: move multi-cursor tokens to index.css - #178

Merged
xiaolai merged 2 commits into
mainfrom
fix/171-multi-cursor-tokens
Feb 22, 2026
Merged

fix: move multi-cursor tokens to index.css#178
xiaolai merged 2 commits into
mainfrom
fix/171-multi-cursor-tokens

Conversation

@claude

@claude claude Bot commented Feb 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Moved --multi-cursor-color and --multi-cursor-selection-bg token definitions from src/plugins/multiCursor/multi-cursor.css to src/styles/index.css (both :root and .dark-theme blocks)
  • Removed redundant var() fallback values in the plugin CSS — the tokens are now guaranteed to exist

Why

Plugin CSS files should not write to :root — design tokens belong in index.css (the single source of truth). This eliminates a hidden CSS ordering dependency and follows the convention in .claude/rules/31-design-tokens.md.

Test plan

  • Open a document, use multi-cursor (Alt+Click) — carets should appear blue
  • Switch to dark theme — carets should be a lighter blue
  • Selections on secondary cursors should have a translucent blue background in both themes

Closes #171

🤖 Generated with Claude Code

The multi-cursor plugin was defining :root tokens in its own CSS file,
violating the convention that all design tokens live in index.css.

Closes #171

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
claude Bot requested a review from xiaolai February 22, 2026 21:11
@claude
claude Bot force-pushed the fix/171-multi-cursor-tokens branch from 698a884 to 81b4f77 Compare February 22, 2026 21:12
Add multi-cursor tokens to design-tokens.md documentation per rule #6:
"Update this doc when adding new tokens to index.css."
@xiaolai
xiaolai merged commit 458b1c4 into main Feb 22, 2026
2 checks passed
@xiaolai
xiaolai deleted the fix/171-multi-cursor-tokens branch February 22, 2026 21:49
xulis pushed a commit to xulis/vmark that referenced this pull request May 11, 2026
* fix: move multi-cursor tokens to index.css (source of truth)

The multi-cursor plugin was defining :root tokens in its own CSS file,
violating the convention that all design tokens live in index.css.

Closes xiaolai#171

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address review feedback for PR xiaolai#178

Add multi-cursor tokens to design-tokens.md documentation per rule xiaolai#6:
"Update this doc when adding new tokens to index.css."

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: xiaolai <lixiaolai@gmail.com>
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.

[audit] convention: multi-cursor plugin defines :root tokens instead of using index.css

1 participant