开发者

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);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜