.less css files in .NET and Visual Studio

  • Recommended way to handle inactive files is to use pre-compiled static files or use some runtime conversion using, for example, HttpHandler? What are the pros and cons of the different ways of doing this?
  • What are the recommended methods for solving the above approach? Tools, libraries, etc.
+5
source share
1 answer

Since you are on .NET, I recommend you check out the DotLess project . It is open source and very active. They have an HTTP handler that connects to IIS, it captures any request for the .less file and returns a valid CSS file. I don’t know how much caching they use, but you can probably rely on the browser to cache it enough.

The DotLess project also has an executable file that will be compiled whenever you want (for example, during the build of the project) or on demand.

, , . , LESS.js , , javascript, . , , - . , , .

+6

All Articles