Closed sonphnt closed 7 years ago
We do it something like this in our project:
c# code
string sass = "$color: #123456;\n"
+ "@import \"template\";";
var compiler = new LibSassNet.SassCompiler();
var css = compiler.Compile(sass, outputStyle: LibSassNet.OutputStyle.Nested, includeSourceComments: true, includePaths: new[] { Server.MapPath("~/Content/sass") });
_template.scss
body {
background-color: $color;
}
Hi all,
Can we change a variable and also combine all sass files into one and then generate a file css file ?
For example I want to change @body-color that depending on my setting in database and a css file should be generated base on that color.
Thanks