-  -

Using less css preprocessor with Diem

Using a Cascading Style Sheet Pre-Processor (CSSPP) like LESS or SASS can greatly reduce css development and maintenance time.
Now you can easily use LESS with Diem. Some explanations.

Why using a Cascading Style Sheet Pre-Processor (CSSPP) ?

I'm mainly a front developer and I like CSS coding but on large frameworks css can become a real mess to maintain or debug.

Main reasons are :

  • poor design : templating and css are not developed in an object oriented way, but "as things comes" just overloading and using !important as a normal property. This leads to huge cascades. @see : Nicole Sullivan - Our Best Practices Are Killing Us
  • need for interoperability (use of hack technics) : as we still try to accommodate IE6 and other clumsy browser, HTML5 / CSS3 are on the rise. Using the last hack to round corner even on IE6 leads to overloaded css.

It's here that CSSPP comes to the rescue (or definitely kills our style efficiency).
We now have different points of view about CSSPP :

Reading those to posts make me think that bad coding technics already leads to spaghetti code that is difficult to understand and maintain, and it's true for all the actors of the production chain.
And corollary is that the use of CSSPP need to be done with programming best practices knowledge (factoring, oop) if we want it to really ease developers life. That's my two cents.

Using Less with Diem

A discussion on Diem user group led me to fork to sfLESSPlugin and, with use of lessPhp to propose a quick solution to use less with Diem.

The howto is here.

Just let me now if you have any questions.

Read doc at : leafo lessphp parser doc

Leave a comment

Your email will never be published

Comments for this post

  1. Ramon said - April 12, 2011permalink

    And it works, well done. How about a tutorial to install and use less with Diem ?