When to edit .less file and when to edit .css file

Hi
I have bought a template which has both a .css file and a .less file. I have been playing around with these since i want to change some colours and sometimes I have to change the .css and other times the .less. i have looked up documentation on this and it doesn't make a lot of sense. It says that it is a pre-processor - does this mean it then creates the .css?

Are there any rules I can follow as to whether I should be updating the .css or the .less? I am using trial and error at the moment which is taking forever so if I understood how they worked I would be much happier!

thanks for your help
lz7cjcAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mark BullockQA EngineerCommented:
Do you generate the .css file from the .less file using lessc (the less compiler) or some other tool?
Or are they unrelated files?
lz7cjcAuthor Commented:
I don't know! They were supplied, as is... Perhaps that's the problem?  I've got pycharm, so can I compile using that?

If the css is compiled from the less file, presumably that means I only edit the less file?
Mark BullockQA EngineerCommented:
Are the names of the files similar?  Like mydoc.css and mydoc.less

You can use the Less compiler lessc to convert .less to .css.
You can get it from this site: http://lesscss.org/
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

lz7cjcAuthor Commented:
Yes they are both called style.xxx .So do I make changes to the .less and then compile? Might there be additional settings in .css that aren't covered in .less?
Thanks
Mark BullockQA EngineerCommented:
1. Yes.
2. You can make a copy of your .css file (e.g. styleOriginal.css) then run the less compiler. Compare the two .css files. If they are identical, the answer is no. I would expect the original and new .css files to be identical.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lz7cjcAuthor Commented:
Ok thanks...I'll do that later. Is there any reason why the html references/includes both the .less and .css if one generates the other?
Mark BullockQA EngineerCommented:
The developer may have done this for his convenience.
Using less.js in the browser is great for development, but it's not recommended for production
lz7cjcAuthor Commented:
Thanks for your help...much clearer now :-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.