How to solve CSS intellisense for VSCode not working? - css

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!

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.

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.

if you install extension POSTcss try to disable

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.

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.

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

Related

Moodle without stylesheet

I've just installed the latest version of moodle on my server but I get the moodle site with no styles as if it can't detect the css sheet.
During the installation process was all apparently well but once I finished I get my moodle site without styles, you can check here
If someone could help me I would appreciate it, thanks
I found the solution in this other post moodle not showing CSS and theme with linux server That works perfectly for me.
Thank you for all.
This might also happen if there is any error in scss files.
Check if you have missed any semi-colon at the end of any line.
Mostly the misspelled properties or values throws this error.
Turn on the theme designer mode to get to know the detailed error.
// Got to do this //
url : http://moodle.test/admin/settings.php?section=http
Use slash arguments slasharguments => uncheck the checkbox (Default: Yes)

Vaadin Valo Stylesheets

I'm having a problem using Vaadin (in Eclipse) and its associated styling engine Valo, and the TouchKit package. I mention all of these because I'm not sure which, if any, is causing the problem. The name of my custom theme (which imports Valo) is simply "touchkit".
I have the project running on a Tomcat server on localhost and accessible in my browser. I wanted to tweak some of the CSS so I edited the appropriate file WebContent/VAADIN/themes/touchkit/touchkit.scss. After editing this file, I recompile the theme and see the appropriate changes in the generated file styles.css. Then I go to load up the application in my browser, and things get weird.
I can load the page and, using Chrome's developer tools, see that the page requests styles.css for download, as expected. It gets a 200 OK response from the server, but when I view styles.css, it contains just a single \n. This is also true in Safari. Even using cURL to download styles.css yields the same result. In the Eclipse editor, and when I inspect it in the terminal, styles.css is ~12,000 lines long. Why can't my browser or cURL get that data?
I can view similar project demos on Vaadin's own site and the stylesheet (which should be almost identical to mine) is loaded correctly. Also, other Vaadin projects on my localhost server have their stylesheets loaded correctly (though they do not use Valo). Compiling the theme in Eclipse yields no errors. Because the issue presents itself across a variety of graphical and non-graphical clients, I'm starting to think the issue is with Tomcat. But I can get to the directory from which Tomcat serves files and styles.css is correct in that folder too. There's no apparent reason that Tomcat would be serving a blank file.
You may have guessed from the description, but I'm working on a Mac. Any help is appreciated!
PS Mods - I also asked this question over at Superuser since it wasn't 100% a programming question. However, I'm new at Superuser and couldn't create tags for Vaadin or Valo, so I'm asking here where there might be a better chance of getting an answer.
Hard to say, since your are doing everything fine. My best bet would be the tomcat implementation you are using, maybe there's something weird there. Try upgrading to latest if it's not or to a previous version.
FYI I'm using Tomcat 7.0.55.
PS: your attempts are in run/debug from eclipse or have you made a .war form the project and deployed it with the Tomcat-Manager?
Regards
add below to your gwt.xml, and touchkit is not valo aware see https://vaadin.com/forum/#!/thread/8264224/8264223
<set-configuration-property
name='touchkit.manifestlinker.additionalCacheRoot'
value='src/main/webapp/VAADIN/themes/MyTheme:../../../VAADIN/themes/MyTheme' />

Compass Bootstrap CSS cache issue

I'm currently running Compass and Bootstrap 3 through a Vagrant VM Box.
I've managed to successfully setup the project using both the Compass and Bootstrap Gem's.
I've now started writing my styles. Upon save I can see which files have been modified and if a the CSS has been re-compiled through SuperPuTTY, when using compass watch --poll. However, when either compiling via compass watch or through compass compile, I only occasionally see the changes through my browser.
I don't believe this to be a browser caching issue, as I've turned it off via dev tools, I've also tried clearing the cache, as well as directly opening up the newly compiled CSS and adding a ?1234 cache buster to the end of the URL. I'm also getting no errors upon compile (these are also normally displayed within SuperPuTTY).
I have a suspicion the problem may lay in the bootstrap plugin as this require 'bootstrap-sass' is loaded in the config.rb file, I'm currently investigating this.
Is anyone aware of any fixes for this, or aware of any issues/bugs with Compass compiling the Bootstrap SCSS code?
/------ UPDATE ------/
After further investigation this seems to be a caching issue. The file seems to be correct on the server after compiling, but when it arrives at the browser it seems to retain the old version. The browser cache is disabled, this is where my confusion now lays, as it should request a new file upon refresh.
We seemed to have fixed the problem by adding a no-cache rule for our header, and also disabling sendfile in the Apache vhosts file. This combination seems to have resolved the issue

PhpStorm + Live Edit, can not see changes made to the attached css-file

Good afternoon. I connect to IDE PhpStorm Live Edit, set the extension to Chrome. The draft pick html file in the shortcut menu - "Debug index.html" - everything works, everything seems fine. But I have styles stored in the connected file styles.css, and the changes that I'm doing there is not displayed. If I am bringing in the project on styles.css - the shortcut menu for css-files, no point "debug". Html-files for this item have. But I found a video - https://www.youtube.com/watch?v=w0Db0TTZJa8, on it guy ruled css file and the page immediately visible changes. How can I configure Debugging connected css-file?
There is certainly a perverse method - css file copy of all styles and stuff in the head, then everything works, but I wanted would not be subverted.
i had the same problem as you described above. Found the answer in another post here on Stackoverflow: >>>>Quoted from here<<<<
"It has been a while since this question was asked, but I stumbled over the same problem recently and couldn't find any help on that topic.
After some experimenting, I found that setting the Live Edit options from Manual to Auto in (ms): solved the problem.
Settings -> Build, Execution, Deployment -> Debugger -> Live Edit -> toggle "Auto in (ms)" on
PHPStorm Live Edit Settings"
Maybe its too late for you, but someone else will hit this post for sure, since it is on top in google :D
Most probably this is the same issue as WEB-11393
Problem is caused by changes in Chrome API.
Please check if the problem persists in the PHPStorm 8 EAP (http://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program) with the most recent Live Edit plugin installed

When I try to use grunt serve to view a locally stored web app, the CSS doesn't work. What are the common causes for this?

I think I have installed everything needed and installed it correctly, but I am obviously missing something; or had a misstep somwhere along the line. I am on a Linux and I know for a fact the site works when viewed elsewhere. Here is a screenshot of what I see when I view the site locally: http://imgur.com/yPWcanu What are the common causes for this?
There might be some problems with paths. Open the Chrome development toolbar and check if there's a problem with loading the css files.
You should see them under the "Network" tab after reloading the page.

Resources