Quantcast
Channel: Netboy » php
Viewing all articles
Browse latest Browse all 5

LESS + CakePHP, best buddies

$
0
0

LESS takes CSS to a whole new level by extending it with dynamic behavior (think of working with variables, functions or mixins directly in CSS).

Here below a few quick notes about integrating LESS with CakePHP.

There are a few different ways of adding LESS support to a CakePHP project, but by far the best one I know is to first install the asset_compress plugin by Mark Story and then to add a custom filter to it. The asset_compress plugin actually supports LESS out of the box, the only issue I have with it is that running Node.js just to parse LESS stylesheets seems like an overkill. I much prefer to use lessphp implementation instead of the Node.js implementation of LESS.

The good news is that a plugin exists that makes it very easy to add a lessphp filter to asset_compress.
It was created by Frank de Graaf (Phally) and I had the opportunity to rewrite it to support the latest asset_compress v0.4.

Check it out at github and follow installation instructions there.


UPDATE 09.2012:
asset_compress now comes with a LESS filter by default – no need to install any extra filters


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles



Latest Images