Open tauren opened 10 months ago
Hi, this extension should work once you have installed it.
By default it support language mode: css, scss, tailwindcss. Maybe vscode choose another language for your file. You can check it by clicking on the language mode in the bottom right corner of vscode.
I just published a new version(v1.2.0) that adds support for configuring the supported languages. If you want to add support for another language, you can add it in the settings. For example, if you want to add support for html, you can add it like this:
"cssVarColorDecorator.supportedLanguages": ["css", "scss", "tailwindcss", "html"]
It does not work for me either with a clean install of svelte plus svelte-shadcn.
The file from the basic installation src/app.pcss
is still with no hint of the color, and I added all these to the settings:
"cssVarColorDecorator.supportedLanguages": [
"css",
"scss",
"tailwindcss",
"pcss",
"html",
"svelte"
]
I've updated the extension, but still no luck. Also tried switching the editor language mode (bottom right) from PostCSS to CSS, SCSS, etc. None work. I added the settings config with "postcss" in supportedLanguages, still no go.
I'm not sure what exactly changed, but its working for me now. I haven't restarted VSCode or anything. But I did clean up my project and removed a bunch of unused dependencies. Anyway, works great now, thanks!
I'm having the same issue, using shadcn. Have updated the supported languages.
I found that VSCode was in "PostCSS" mode for some weird reason. Setting the language mode to CSS fixed the extension and it applies the color decorators now.
This works for me
"cssVarColorDecorator.supportedLanguages": [
"css",
"scss",
"tailwindcss",
"postcss"
]
@meouwu-dev This plugin looks like exactly what I need! But when I install it, I see no difference in my CSS file. The plugin is enabled in VSCode. Is there some activation or configuration that I need to make? How can I check if I'm hitting a bug?
My
index.css
file looks like this:Edit: The hex2Hsl feature does appear to be working. But no existing HSL values have a color swatch shown in the file.