I have to call a javascript function from the less css for customization purpose. The function needs to pass the less variable from less file to js. is it possible to do it? usi
You can embed javascript in lesscss files with backticks.
For example:
@myObject: `function(){ var myObject = { getSomething: function() { return( "This is yo' content!" ); } }; return( myObject ); }`;
Notice the backticks (not single quotes).