cr34t1ve / csvars

CSS Variable completions for vscode
MIT License
5 stars 0 forks source link
css cssvariables vscode-extension

CSVars - VSCODE CSS Variable Completions

A Visual Studio Code extension that provides intelligent autocompletion for CSS custom properties (CSS variables) across your entire workspace. Get suggestions for all your CSS variables with their values and documentation while you type.

Features

CSVars Demo

Usage

  1. Start typing var( in any supported file
  2. The extension will automatically show completions for all CSS variables defined in your workspace
  3. Select a variable to insert it
  4. Hover over a variable to see its value, documentation, and source location

Example completion:

.example {
  /* Start typing var( here */
  color: var( /* Completions will appear */
}

Supported File Types

Variable Detection

The extension detects CSS variables defined in the following format:

--variable-name: value; /* Optional comment */

It automatically indexes:

Features in Detail

Smart Completions

Documentation View

When you highlight a completion, you'll see:

--variable-name         value

Along with:

Real-time Updates

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "CSVars"
  4. Click Install

Configuration

Currently, the extension works out of the box with no configuration needed. It automatically scans all CSS, SCSS, and LESS files in your workspace for variables.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Known Issues

Release Notes

1.0.0

License

MIT

Support

If you encounter any problems or have suggestions, please open an issue on our GitHub repository.


Enjoy! 🎨