VS Code extension that autocompletes CSS variables from your WordPress theme.json.
Features
Supports both core and custom variables.
Provides suggestions for all default variables (as of WordPress 6.8), unless explicitly disabled in your theme.json.
Smart var() wrapping
Suggestions are automatically wrapped in var() only when appropriate—no more double wrapping!
Context-aware
Suggests only relevant variables based on the current CSS property you’re editing.
Minimal performance impact
Theme.json is cached and only reloaded when modified, ensuring fast and seamless autocompletion.
Easy integration
Just install and start coding—no configuration needed.
Requirements
This extension only works inside an open workspace. Make sure you have a folder or project opened in VS Code.
A valid theme.json file is also required in your workspace to enable suggestions.
Extension Settings
This extension contributes the following setting:
theme-json-autosuggest.themeJsonPath
Path to your theme.json file. If left blank, the extension will use the theme.json located in the workspace root.