This repository was archived by the owner on Oct 24, 2025. It is now read-only.
  
  
  - 
                Notifications
    You must be signed in to change notification settings 
- Fork 32
Usage
        treefishuk edited this page Oct 5, 2016 
        ·
        3 revisions
      
    Using LibSass-net is fairly easy and the most basic setup is composed of 2 steps
- Installation Simply execute this command in your package management console:
Install-Package libsassnet.Web
the instalation will take care of adding .scss http handler to you Web.config
- Adding a bundle
 bundles.Add(new SassBundle("~/Content/css").Include(
           "~/sass/site.scss"));- Installation Simply execute this command in your package management console:
Install-Package libsassnet
var sassCompiler = new SassCompiler();
var compact = sassCompiler.CompileFile(@"C:\<path to scss file>\Site.scss", OutputStyle.Compact);
System.IO.File.WriteAllText(@"C:\compact.css", compact.CSS);var sassCompiler = new SassCompiler();
var result =  sassCompiler.Compile("body { color:blue; }");
System.IO.File.WriteAllText(@"C:\compact.css", result);- OutputStyle.Nested
- OutputStyle.Expanded
- OutputStyle.Compact
- OutputStyle.Compressed
- OutputStyle.Echo