css editing and auto completion

So due to the fact that all of the CSS is in ELGG is in .php files, my editor (and several others I have tried) does not recognize the CSS and therefore does not colorize nor auto-complete the CSS.

I am currently getting around this my creating two CSS files, the .php version for elgg and then a second file with the .css extension.  I simply place an include in the .php file and place all of my css in the other file.  

Sure, now I have the opposite problem of my PHP inside the CSS file does not get autocompleted or colored.  But I have a lot more CSS than PHP in those files.

Am I the only one who cares about this and if not, what solutions have you all come up with the make your coding a little less painful?

  • That's ok Brett. I was not disputing the way in how Elgg manage the css files, I knew why it's made like that and it's ok for me. I'm using that trick only for my theme, and it could be even a temporary solution, getting back the css code into the php file when it's done.

    About the autocompletion, I think it's up to any one -novice or experienced- the selection of the tool or the technics to use.

  • @morgar - if you are talking using a hack for your localhost, testing environment, it might make it easier - for the novice - to do the editing and see the results. But, as you suggested, the code should be brought back into the PHP file for production uses.

  • Ok, ok, I'm a novice, I must admit it ;)

  • As morgar also inferred, this was not really intended as a final 'release' solution, but a way to make development/testing a little easier while working on a theme.  The whole point of this discussion was to explore other ways to solve this simple annoyance (the fact that I am asking infers that I wasn't all that happy with my current 'workaround').

    I will have to try out Komodo Edit out.  It sounds like it gives you a little more control over how things work.  I always appreciate that. Although I am not sure I understand the Ukrainian reference.  I am sure it is just an inside joke I missed.

    Thanks for the input.

  • I really do not know what the fuss is all about..

    I just tried wrapping the css code and everything worked just fine..

    The php file starts with <?php and this tag closes with ?> before even the css code starts..

    All I had to do is add <style type="text/css"> after the ?>... uploaded and tested... all good.

    If you know your stuff, you should know that the <style type="text/css"> will be dumped anyway and all it will be good for is to trick your editor.

    @Morgar, may be if you give it a test since you are using DW and then let us know if its not too much trouble.

    Thanks.

     

  • @danielwells - Don't you know that Ukrainians are all poor and use cracked software?  LOLZ!  :-P  So, if I have a paid Komodo IDE license, then I am sure you can too! Afterall, you're in the richest country on Earth, aren't you?!  :-)

    Again, I don't think Carlos' solution is needed.  Just get a better editor / IDE.  ...By the way, danielwells, it's the IDE that you'll need, according to the table of differences.  But, certainly the Edit is much more powerful than most software solutions.  I do own Dreamweaver CS4 (yes, the paid license as well!) and use it and love it, but Komodo IDE is the hackers dream.

  • @yakiv thanks for the clarification on Ukrainian culture :)   I tried Komodo Edit and was able to get it to work as you said.  However I think I may opt for a third option.  I have downloaded a very basic dedicated CSS editor and will use it to edit the CSS.php files for now (in tandem with my IDE of choice).  This way I don't have to choose my IDE based on this one simple thing.

    Thanks again. 

  • What dedicated CSS editor are you talking about?

  • For now I will be using TopStyle lite.  It seems to support the full CSS2.1 standard so it should workfor most of my needs.

  • If you are on Windows, Stylizer rocks for CSS editing, although I should try TopStyle someday.

    http://www.skybound.ca/