cloudhead/less.js — Issue #626: How to render a string of LESS from JS
Author: jeff-h
Created: 2012-02-09 07:59:54+00:00
State: open

I'd like to use my own Javascript code to call the LESS js render function to convert a string of LESS css.

Something like:

```javascript
var lessString = ['@color: #aaa;',
'p {',
' color: @color;',
'}'
].join('\n');

createCSS(less.parse(lessString), { title: 'lessString1' });
```

...but I'm not having any luck working out what functions to call and how to even get access to the less functions from my own separate javascript.

Is it possible?