VS Code Extension
The TailTrace VS Code Extension provides intelligent code completions and hover information for CSS values, translating them to Tailwind tokens as you type.
Features
Section titled “Features”- IntelliSense Completions - Get token suggestions when typing CSS values
- Hover Provider - See Tailwind equivalents on hover
- Config Watching - Automatically reloads when config changes
- Multi-root Support - Works in monorepo workspaces
Installation
Section titled “Installation”From VS Code Marketplace
Section titled “From VS Code Marketplace”Search for “TailTrace” in the Extensions panel, or:
code --install-extension tailtrace.tailtrace-vscodeFrom Source
Section titled “From Source”git clone https://github.com/tailtrace/tailtracecd tailtrace/packages/vscodebun install && bun run build# Then "Install from VSIX" in VS CodeCompletions
Section titled “Completions”When typing a CSS color or spacing value, TailTrace suggests matching tokens:
.button { background-color: #3b82f6 /* ↑ Suggests: bg-blue-500 */}Completions show:
- Token name and Tailwind class
- Confidence level (exact/fuzzy)
- For colors: a color swatch preview
Hover Information
Section titled “Hover Information”Hover over any CSS value to see its Tailwind translation:
#3b82f6 → bg-blue-500 (Exact)15px → p-4 (Fuzzy, 1px off)For colors, hover shows:
- Delta-E difference
- Suggested token
- Color swatch comparison
Configuration
Section titled “Configuration”Settings
Section titled “Settings”Configure via VS Code settings (Cmd+,):
{ "tailtrace.configPath": "./tailtrace.json", "tailtrace.deltaEThreshold": 2.3, "tailtrace.spacingThreshold": 2, "tailtrace.enableCompletions": true, "tailtrace.enableHover": true}Config Discovery
Section titled “Config Discovery”TailTrace looks for configuration in order:
.vscode/tailtrace.json./tailtrace.json(project root)./tailwind.config.js(extracts theme)- Tailwind CSS defaults
Supported Languages
Section titled “Supported Languages”The extension activates for:
- CSS / SCSS / Less
- JavaScript / TypeScript
- JSX / TSX
- Vue / Svelte
- HTML
Commands
Section titled “Commands”Open the Command Palette (Cmd+Shift+P) and search for:
| Command | Description |
|---|---|
TailTrace: Reload Config | Force reload configuration |
TailTrace: Show Token Palette | Browse all available tokens |
TailTrace: Translate Selection | Translate selected CSS value |
Troubleshooting
Section titled “Troubleshooting”Completions Not Showing
Section titled “Completions Not Showing”- Verify the extension is enabled for the current language
- Check that a valid config file exists
- Try running “TailTrace: Reload Config”
Wrong Tokens Suggested
Section titled “Wrong Tokens Suggested”- Check your
tailtrace.jsonhas the correct token values - Verify the Delta-E threshold isn’t too high
- The suggested token might be perceptually closest even if different
Performance Issues
Section titled “Performance Issues”For large projects:
- Reduce the number of tokens in your config
- Use more specific file path patterns
- Disable hover if only using completions