PHPStorm 6 CSS Class completion not working? Follow
Something strange I have noted in PHPStorm 6 is its inability to complete css classes in HTML. I think this is such a usefull features. As an example, even if I manually add the file in the HTML it does not auto complete:
For example, adding:
<link rel="stylesheet" href="/themes/default/bootstrap/css/bootstrap.css" type="text/css">
Wont auto complete if you type:
Is there somthing that is turned off by default now?
Please sign in to leave a comment.
Work's for me in 6.0 (127.100). It's turned on by default. Try reviewing your settings.
Damn I wonder what it could be. Just something to note is, if I add css inside the html file, it picks up those classes just fine. Its just any css files does not get picked up at all.
Thanks a million for the reply, I will keep investigating.
Tried a fresh install under ubuntu 12.10, still not working, this must be a bug then as I have installed it on two computers.
Did you try it both times on same project or a directory with exactly same content?
Ok, I have discovered that it works fine with .php files, try creating a .html file and you will note that it stops working.
Thanks for your reply, I have discovered that it works 100% within PHP files HTML, but try creating a .html file then you will note that it does not auto-complete.
Actually I tried it on .phtml file before. I just created an .html file and it still works perfectly. It was an empty file with just a <div> and class. It wasn't even in a directory with any of the CSS files.
I just want to say thanks for taking a moment of your time to get involved with this issue, I appreciate it very much.
Mmm this must be a Linux thing then, I just created a brand new project with css files, in .php it works perfectly in .html file it does not work :( its driving me crazy.
To make it even more interesting - I work on Linux Ubuntu 12.10:)
Wow then I am out of ideas, I am using Ubuntu 12.10, fresh install... I even tried a PHPStorm fresh install, I created a project with bootstrap and a html file. Nothing... lol.
Would you do me a huge favour and try one last thing, I noted if the HTML file is empty it works, but as soon as it contains
Now try to add a div to auto complete a class, I am positive it wont work.
To replicate this bug I did this on another system:
What steps will reproduce the problem?
1. Install a fresh installation of 127.100 on Ubuntu 12.10
2. After installation create a new project with CSS files included.
3. Create any .html file (works with .php files), and add <html></html> tags (it works without them).
4. Now try and type in a class in the <div > field that you know exists.
What is the expected result?
Autocomplete is suppose to popup to complete the class name like with .php files containing html, this does not happen in .html files.
What happens instead?
Instead there is absolutely no autocomplete of any class except css written directly in the .html file.
Please provide any additional information below.
Even if you include the css file directly via <link> inside the html file, the css autocomplete still does not work.
Finally discovered what my issue was, I had these tags
in my .html file, for some reason having css directly in your html file makes it stop working. I hope this helps anyone in the future from going throught what I went through trying to figure it out.
Please provide some small and simple but standalone (self-contained) project (the whole project, including .idea subfolder; must include all required files).
What tags? I see no screenshots at all (in any of your posts)
Hi thanks for your reply, however I discovered the issue, when I start developing a new page I just add the css inside <style></style> tags, this makes the stormphp focus on the css inside the style tags and drops autocompletion for outside css files. I appreate your help but it is now solved. Just dont have style tags in your html files :)
That is correct:
Thanks, this is actually expected behaviour and does make sense. Thanks.
There are some way to
If you have style (or appropriate link) tag(s) in your file, IDE will offer entries from them and the All .cssf iles?
No. Please vote for https://youtrack.jetbrains.com/issue/WEB-7317 and linked tickets