Sunday, March 31, 2013

Less for Dot Net -


Just hit an interesting utility, LESS Compiler for .net (
So you can leverage the power of less (Dynamic CSS) in your .net web applications


Just add the following to the Web.config
<add type="dotless.Core.LessCssHttpHandler,dotless.Core" validate="false" path="*.LESS" verb="*" />
<section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler,dotless.Core" />
So, now you added a handler for .less files
Then configure it
<dotless minifyCss="false"
 cache="true" />   

*You can also use it from the code
Less.Parse("div { width: 1 + 1 }");
which will produce 
div {
  width: 2;

More Here

No comments:

Post a Comment