Apologies if this has been asked in the past but I have not managed to get a working solition.
I have tried to include less vars from my custom module into my theme but I have been unsuccessful. I currently have a var defined in my module.info file as:
less[vars][@FontColor] = '#FF0000'
In the theme admin I see the section for the module -> less -> var displayed but I cannot use @FontColor in my Themes less.css files. I get a variable undefined error.
I have tried using "hook_less_variables" in my template.php file to pull the modules vars and set them as template vars but still no luck.
It seems that my theme does not actually call theme_less_variables.
I have searched/read:
https://www.drupal.org/node/2139603
https://www.drupal.org/node/1543276
https://www.drupal.org/node/1787160
I dont know if I am missing something but nothing has worked for me.
Please advise & Thanks in advanced!
Comments
Comment #2
Ivan_Dagreat CreditAttribution: Ivan_Dagreat commentedCan anyone advise me if this is even possible or an alternative approach?
Comment #3
kurapov CreditAttribution: kurapov as a volunteer commentedCheck the processing order of variables specified in current theme's .info file, hooks and external modules. I think the variable specified in your module will only apply to the stylesheet declared using
less[sheets][] = relative/path/to/stylesheet.css.less
in your module's info.Comment #4
rmajed CreditAttribution: rmajed as a volunteer commentedI have faced the same issue, the function of [theme]_less_variables was not being called
so, when i used [theme]_less_variables_alter instead it worked well..
give it a try
Comment #5
rmajed CreditAttribution: rmajed as a volunteer commentedI have faced the same issue, the function of [theme]_less_variables was not being called
so, when i used [theme]_less_variables_alter instead it worked well..
give it a try