Send a variable too less file

Permalink
Hi,
Sorry if this is a newbie question. Is it possible to send a parameter to my theme less file (from php)? i mean something like font-size to less?

 
tallacman replied on at Permalink Reply
tallacman
So you want to define your font size in php?
Herkool replied on at Permalink Reply
Yes.
tallacman replied on at Permalink Reply
tallacman
You could make your css file a php file. I assume you could make your less file a php file, too. In which case php would be available.
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi Sepehr,

I think you might be able to using the Less_Parser class.
https://github.com/oyejorge/less.php...

A couple core examples of using the Less_Parser are: the StyleCustomizer class and the Feature block.

Here is an example of the Less_Parser's ModifyVars() method being used to modify Less variables and then turning the Less file into a required CSS asset:
https://github.com/mlocati/concrete5-cover-picture-7/blob/master/blo...