The .Net wrapper of the libsass library that is C++ port of the Sass CSS precompiler.
Libsass is a C/C++ port of the Sass CSS precompiler. The original version was written in Ruby, but this version is meant for efficiency and portability.
This library strives to be light, simple, and easy to build and integrate with a variety of platforms and languages.
Just a wrapper of the libsass with several improvements.
It supports custom importers (ISourceProvider
) instead of libsass.
To install full support of Sass to an ASP.NET web application:
PM> Install-Package XWeb.Web.Sass.Full -Pre
By default, it serves *.scss files. Handler specified in Web.config file.
To create Sass bundle, write those in bundle registration:
using namespace XWeb.Web.Optimization.Sass;
public static void RegisterBundles(BundleCollection bundles)
To use bundle in razor view:
: If BundleTable.EnableOptimizations
(usually on Debug config), bundle will not be packed and would not be transformed. In this case, must be handler (SassHttpHandler
) specified to serve *.scss files.
Coming soon =)
It is plan to build NuGet packages: