开发者

dotless API call

开发者 https://www.devze.com 2023-02-20 13:42 出处:网络
Is there a way to call dotless API programmatically and get final CSS? Something开发者_开发问答 like this:

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

精彩评论

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

关注公众号