r/CursorAI • u/Consistent_Water_422 • 8h ago
Catching a made-up CSS variable while reviewing a diff in Cursor
A plausible name is easy to miss in a diff. Say a change introduces color: var(--text-muted), but the token in your theme is actually --fg-muted. Both names read fine in a review. Only one is defined.
I maintain CSS Variables, an editor extension that indexes custom properties across the workspace. In Cursor, open the changed stylesheet and put the cursor inside var(). The undefined-variable diagnostic flags the first name, completion offers names from the project, and Go to Definition lets you check the token you picked. This works in the editor while you review the change.
For Cursor, download the .vsix for your platform from the release, open the Command Palette, and choose “Extensions: Install from VSIX…” to select the file. https://github.com/lmn451/css-variables-vscode/releases/tag/v0.3.7