Well, this is embarrassing, basically, the CSS Intellisense stopped working out of the blank, not sure if I can relate it with the installation of TailWind Intelissense extension, interestingly it works on SCSS files, but if I try it in a vanilla HTML + CSS project it does not work. I am using Fedora 35. I already tried restarting the editor as recommended on the official website.
I had the same issue. So, I solved it by adding
"files.associations": {
"*.css": "css",
"css": "css"
}
to my my settings.json file. Don't know is it is going to help you, but anyway. Good luck!
When I'm using a basic style.css
file, even after adding "postcss": "css"
in "emmet.includeLanguages":{}
CSS Intellisense still doesn't work.
Disabling the postcss VSCode extension allows CSS Intellisense to work properly for me.
I know this is a little late for the answer, but I had the same issue when using tailwind.
Given that you are using tailwind, most likely there is a chance you are using postcss
, which you can confirm by checking postcss.config
file.
If that is the case, then install the postcss vscode extension, and follow the instructions:
- Open the command palette and select Preferences: Open Settings (JSON)
- Add the following configuration:
{
"emmet.includeLanguages": {
"postcss": "css"
}
}
This should fix your css autocomplete, it is what worked for me.
min-hei...
, vscode suggested min-height
, but that's not working when the postcss extension is enabled –
Diagonal emmet.includeLanguages
? –
Howund "postcss": "css"
config is already present in emmet.includeLanguages
–
Diagonal Another late answer but it seems this is still an issue when using the extension PostCSS Language Support.
Solved by uninstalling that extension and replacing with PostCSS Intellisense and Highlighting.
I have installed this extension in vs code. CSS
, HTML
and Bootstrap
intelligence showing up.
IntelliSense for CSS class names in HTML
Follow these steps:
- Click on Select Language Mode option in the Status Bar of VSCode
- Click on Configure File associations for .css in the modal opened
- Configure the language you want to associate your *.css files to. Here in our case, you need to select CSS
- Reload VSCode window if changes don't get reflected
-Open VSCode
-Click Code in the toolbar
-Go to Settings>>Settings
-Click Text Editor to open the dropdown
-Click Files
-Under Associations enter *.css
for the "Item" column and enter css
for the "Value" column
-Repeat this with "Item" css
"Value" css
Here's what the official website says if IntelliSense isn't working:
Troubleshooting #
If you find IntelliSense has stopped working, the language service may not be running. Try restarting VS Code and this should solve the issue. If you are still missing IntelliSense features after installing a language extension, open an issue in the repository of the language extension.
…
A particular language extension may not support all the VS Code IntelliSense features. Review the extension's README to find out what is supported. If you think there are issues with a language extension, you can usually find the issue repository for an extension through the VS Code Marketplace. Navigate to the extension's Details page and select the Support link.
You should probably try:
- Disabling any extensions that may be related to the issue. You mention that it may have to do with the TailWind Extension; try disabling or uninstalling that and see if the intellisense starts up again.
- Restarting the editor again.
- Filing an issue on their GitHub page if it's still not working.
I came to this question having a similar issue and found I just needed to manually change the language mode in the bottom right to CSS rather than Post-CSS. Obvious in hindsight, but just recording here in case anyone hasn't tried it.
Like @timbhison mentioned, I just checked my file type and changed it to "CSS" instead of "CSS liquid" and this solved my problem. Adding the below code didn't have any effect.
{
"emmet.includeLanguages": {
"postcss": "css"
}
}
I disabled the extension -> "PostCSS Language Support". That fixed the bug
Try changing your editor from "ui" to "json" in the settings. (File->Preferences->Settings). Then you may have to use the toggle icon if your current display is the json file. (My icon at the upper right of the screen says "Open Settings"). I am using version 1.87.2 so yours might say something different.
Choose the Settings editor under the Workbench option (or type "workbench.settings.editor" in the search bar) and you can change it from 'ui' to 'json'. Once I changed it, my intellisense starting working again.
{ "emmet.includeLanguages": { "postcss": "css" } }
I solve it by adding this to JSON in the middle
© 2022 - 2025 — McMap. All rights reserved.