lesserphp
lesserphp copied to clipboard
Custom Function to import additional Less from PHP method?
I can see in the documentation that you can register custom functions:
$less->registerFunction("double", function($arg) {
list($type, $value, $unit) = $arg;
return array($type, $value*2, $unit);
});
Awesome! What I am looking to do is to either extend the existing @import or to make a new, custom, function that operates in a similar way, but loads the data from a PHP function. Is this possible?
Also, WRT that, I briefly looked through the code and noticed that you do not import .css files. I am just curious as to why that is. LESS is about dynamic CSS, if my dynamic CSS (configurable by a user) wants to import a static CSS file, why shouldn't it do that?
Just wondering if I am missing something.