dotless API call
Is there a way to call dotless API programmatically and get final CSS?
Something开发者_开发问答 like this:
string lessCSS = File.ReadAllText(lessCSSfile);
string finalCSS = dotless.Core.Less.Parse(lessCSS);
My CSS had a hack for IE5 and that triggered a parser exception, that's why it was not working.
Here is my test code:
try
{
Ruleset ruleset = new dotless.Core.Parser.Parser().Parse(source, fileName);
rv = ruleset.ToCSS();
}
catch (ParserException pe)
{
Response.Write(pe.Message);
}
精彩评论