subhaze/CSS-Extended

CSS-Extended adding classes

dukesanj opened this issue · 18 comments

I'm not sure if this is my fault...

When I add fa in class, fa lists all the font awesome css, but it needs to start with fa.
I have to add fa manually.
Another issue is if I want to add more than one css rule (new css: box1), no list appears
ie. div class="fa fa-glass box1"

ST2 Win7

Thanks for the report, I'll look into this sometime this week/weekend.

thought id add to this ticket if possible?

having the same issue in st3 on winXP and win7

@duukesanj @elshawno2 I'm able to get all completions to show when triggering the completion list via ctrl+space so I guess the issue you're seeing is that the list is not triggered automatically without calling it (ctrl+space).

If this is what you are referring to you can add "auto_complete_selector": "meta.tag string.quoted" to your user settings and that should auto trigger the completion list without the extra keystrokes.

still having issues, relatively new sublime user, so my apologies for any obvious solutions.

i think i read somewhere that that with css extended you need to add the css files to cache in order to get this to work.

is that correct to assume that having the css file linked in the head isnt enough to get this package to work? and if so, what file am i adding the css cache to? my index.html?

perhaps a step by step set up guide would help? thanks

@subhaze nvm sir. moments after writing that i found the solution. in order to get this to work, one needs to right click the FOLDER all of your files are in (html, css, etc...) and then select "add css files to cache". only then will this package work.

@elshawno2

is that correct to assume that having the css file linked in the head isnt enough to get this package to work? and if so, what file am i adding the css cache to? my index.html?

That's correct, it does not load files in based on the link tags in the head of a document (maybe I can look into that as a new feature that attempts to do this?).

It stores cache on file save, or, by using the sidebar and right clicking a folder and selecting to cache that folder. Currently there is no recursion that happens so only the files of that folder are cached and no sub-folders are looked at.

Any suggestions on updating the readme.md is welcomed. Here is the link to the current explanation of how things work https://github.com/subhaze/CSS-Extended#completion-cache

@elshawno2 OK, glad you found the solution. It seems that I need to make that a bit more prominent in the reademe so others don't miss that vital bit of info.

i would definitely consider updating the readme for a clearer explanation and steps on how to get it working. also if you could into having it load whatever css files are linked, i think thats a feature a lot of people would love.

overall, this is exactly what ive been looking for since switching from dreamweaver. A+ would recommend, keep up the great support and thank you!

@subhaze "auto_complete_selector": "meta.tag string.quoted" , dosent seem to be working for me.

@elshawno2 try removing the trailing ,

@subhaze removed the "," still nothing

@subhaze also noticing that while i got it to work, its only pulling up classes that start with a "."

my stylesheet example:

.hello {

}

.wrap {

}

.hello2 {

}

h1 {

font-weight: 20px;
text-decoration: underline;

}

h2 {

}

pressing ctrl+space only bring up everything except "h1"

I've been a bit covered up, but, I'll try to review your updates in the next day or two.

@elshawno2 Classes are supposed to start with a "." Or I may be missing your observation.

@subhaze Can I manually reference an external file from a remote source? Say from a cdn?

Yeah @elshawno2 is correct, if you have a . elements shouldn't added to the completion list. However, elements are currently not in the completion list at all, but, could be added in.

Here is the checklist I've come up with from this ticket:

  • Add instructions in the README.md on what selectors to add for auto triggering the completion list (if possible, in ST3 some areas this is impossible due to how the default CSS package code is setup)
  • More clearly state how the plug-in works and how to add files to the cache
  • Look into caching linked stylesheets on file save
  • Add elements to the completion list

thanks @subhaze !

Moved the list to a new issue here #21