WARNING: concrete5 5.6 and earlier are end-of-life. Sales from the marketplace have now ended. Click here to learn more about this transition.
"LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions. LESS runs on both the client-side (IE 6+, Webkit, Firefox) and server-side, with Node.js and Rhino." - LESScss
This package utilizes the LessPHP library for compiling.
Compiling
yourtheme > less > styles > style.css
Becomes
files > css > style.css
link(file1,file2[,fileX...])
Output the linked html of all inputed paths (relative to files/css) indiscriminately.
Example:
$less = loader::helper('less','less_compiler');
echo $less->link('test.css','test.less','style.css');
~~~~~~~~~~~~
OUTPUT
~~~~~~~~~~~~
<link rel="stylesheet" type="text/css" href="http://yoursite.com/files/css/test.css">
<link rel="stylesheet" type="text/css" href="http://yoursite.com/files/css/style.css">
add(file1,file2[,fileX...])
Add all inputed paths (relative to files/css) to the renderers queue indiscriminately.
Example:
$less = loader::helper('less','less_compiler');
$less->add('test.css','test.less','style.css');
print_r($less->queue);
~~~~~~~~~~~~
OUTPUT
~~~~~~~~~~~~
Array
(
[0] => http://yoursite.com/files/css/style.css
[1] => http://yoursite.com/files/css/test.css
)
renderCache()
Render the cache into link tags.
Calling this function is the same as using the object as a string.
Echoing the output of this function is the same as invoking the object.
Example:
$less = loader::helper('less','less_compiler');
$less->add('test.css','test.less','style.css');
echo $less->renderCache()
~~~~~~~~~~~~
OUTPUT
~~~~~~~~~~~~
<link rel="stylesheet" type="text/css" href="http://yoursite.com/files/css/test.css">
<link rel="stylesheet" type="text/css" href="http://yoursite.com/files/css/style.css">