Jump to content

Archived

This topic is now archived and is closed to further replies.

ketri

How should I proceed if I want to covnert Less --> Css by myself i.e. with CodeKit?

Recommended Posts

ketri

Hello

If I've understood correctly, I can write Less in my child-theme, refresh and see the results. And if I want to see changes instantly when saving, I can use the Custom LESS/CSS -thingy in the DMS front end. 

Problem with writing Less to the child-theme is that either refreshing won't show the changes I've made, or if I use 

define('PL_LESS_DEV',true);

in wp-config.php, the reload time is unbelievably slow. Not good. 

Problem with writing Less in the Custom LESS/CSS -DMS thingy is that I won't get autocomplete, highlighting etc I can get in a decent text editor (sublime text 4-life!). 

What I''ve done, is just link a totally new .css -file to my theme and write Less using CodeKit.
So when I save my custom Less-file, the code is injected to the project. So I'm overriding the default DMS css. 

This all works nicely. But how should I proceed if I wanted to use this system with all the different .less -files that come with DMS?
Does it for example matter in which order they are imported to the one .less -master file which gets then processed to a .css that would be the only .css DMS would load?

So bacically, I want the the speed and injection features of CodeKit, but the structure of DMS less -files. Hopefully you understood =)

Thank you!
 

Share this post


Link to post
Share on other sites
greenfly

You can use the Custom code section of the visual editor to make your immediate changes and add code to make your changes appear straight away and then tweak it as you see fit. When you are happy add it to your child theme files. Does that make sense and is that what you meant? 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
ketri

You can use the Custom code section of the visual editor to make your immediate changes and add code to make your changes appear straight away and then tweak it as you see fit. When you are happy add it to your child theme files. Does that make sense and is that what you meant? 

Not exactly. I understand both of those, but I want to use sublime text and CodeKit to write less using the DMS .less -files. So should I create one file and import them all, and in my child-theme have those files empty so they will override the parent-theme less and I can start without any custom styles?

So I want to compile it on my computer, not so that DMS compiles my Less. I want to use my own text editor because it's better than the DMS custom less -field. And I want to compile my Less by myself on my computer because DMS refreshing is so slow with it. 
 

Share this post


Link to post
Share on other sites
Danny
Sorry, but I can't see a real benefit from using Codekit, as DMS is using it's own php compiler with the best less integration out there. It would only be beneficial if DMS didn't compile it itself. Also, you should be using a child theme and not editing the core files, as this is not recommended and voids all support, as we do not provide support to users who have edited core files, this includes the LESS directory.
 
If you're having poor performance, when compiling, its likely related to your server setup, as I have no issue with loading times.
 
If you use Sublime Text, just go to open and then select your child themes less folder, this will open up all your less files in the sidebar, then you can edit away.
 
The DMS code editor, wasn't never meant to replace a code editor, it's just been made more prettier so its easier to read and write your code. However, I would always choose to write my code in an editor like SubLime Text.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
ketri

 

Sorry, but I can't see a real benefit from using Codekit, as DMS is using it's own php compiler with the best less integration out there. It would only be beneficial if DMS didn't compile it itself. Also, you should be using a child theme and not editing the core files, as this is not recommended and voids all support, as we do not provide support to users who have edited core files, this includes the LESS directory.
 
If you're having poor performance, when compiling, its likely related to your server setup, as I have no issue with loading times.
 
If you use Sublime Text, just go to open and then select your child themes less folder, this will open up all your less files in the sidebar, then you can edit away.
 
The DMS code editor, wasn't never meant to replace a code editor, it's just been made more prettier so its easier to read and write your code. However, I would always choose to write my code in an editor like SubLime Text.

 

The benefit of using CodeKit is
1. being able to use a decent text editor
2. seeing the changes I've made instantly (is also the case with custom CSS but without proper editor, error messages when failing or having the code under my Git-version control)
3. Not having to wait 5-10 seconds when refreshing the page. If I don't use 
 

define('PL_LESS_DEV',true);

I never see the changes I've written and if I do, refreshing is very very very slow. I'm using MAMP so is this perhaps the issue? I'd thinkg having a local setup would only make things faster in most cases but it's possible.
And yes, sublime text is awesome! Only problem with the DMS Less-method is not seeing the changes instantly when I save. So far CodeKit gives the clearly best solution. Hmm maybe I gotta wait and see. 

Share this post


Link to post
Share on other sites

×