How do I keep my exiting CSS from compiled LESS
I'm start using LESS in a project today and found a problem, lets describe this -
I always use predefined CSS Reset and as well as WordPress Core CSS along with my upcoming CSS in any project that I work on. The problem was not happened before I use LESS.
When I write new LESS code and compiled it through SimpLESS application or any other compiler, I just got my existing CSS (Reset, WP Core) code removed from my stylesheet (.css) and update the stylesheet with new CSS compiled code.
It's really annoying for me as I'm using LESS for the first time.
So, how to I keep my exiting CSS and the compiled CSS both at once?
Thanks in advance! :)
Put your existing CSS in your LESS code. Your LESS code will overwrite your css file on every save, so you'll manage all of your styles with LESS.
Change the name of your LESS file so you're not overwriting your existing CSS code, then put links to both stylesheets in your HTML document, or by putting this line in your LESS file:
@import (css) "foo.css";