CompileSass Class
Compiles Sass CSS files to CSS stylesheets.
Namespace
Statiq.Sass
Interfaces
Base Types
graph BT Type-->Base0["ParallelModule"] click Base0 "/api/Statiq.Common/ParallelModule" Base0-->Base1["Module"] click Base1 "/api/Statiq.Common/Module" Base1-->Base2["object"] Type-.->Interface0["IModule"] click Interface0 "/api/Statiq.Common/IModule" Type-.->Interface1["IParallelModule"] click Interface1 "/api/Statiq.Common/IParallelModule" Type["CompileSass"] class Type type-node

Syntax

public class CompileSass : ParallelModule, IModule, IParallelModule

Remarks

The content of the input document is compiled to CSS and the content of the output document contains the compiled CSS stylesheet.

Any metadata prefixed with "Sass_" or "Sass-" (case-insensitive) will be injected into the beginning of the Sass content as variables. Any spaces will be converted to "-" and the "Sass_" or "Sass-" prefix will be removed for the Sass variable name. Note that because these are injected at the top of the Sass content, and because the order of metadata is undefined, variables defined this way should not use other variables in their values. Using the !default syntax in Sass files where metadata variables might override the ones in the Sass file is one technique for working with metadata-defined Sass variables.

Properties

Name Property Type Summary
Parallel bool
Indicates whether documents will be processed by this module in parallel.
Inherited from ParallelModule

Methods

Name Return Value Summary
AfterExecution(IExecutionContext, ExecutionOutputs) void
Called after each module execution.
Inherited from Module
AfterExecutionAsync(IExecutionContext, ExecutionOutputs) Task
Called after each module execution.
Inherited from Module
BeforeExecution(IExecutionContext) void
Called before each module execution.
Inherited from Module
BeforeExecutionAsync(IExecutionContext) Task
Called before each module execution.
Inherited from Module
ExecuteAsync(IExecutionContext) Task<IEnumerable<IDocument>>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
ExecuteContextAsync(IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module once for all input documents.
Inherited from ParallelModule
ExecuteInputAsync(IDocument, IExecutionContext) Task<IEnumerable<IDocument>>
Finally(IExecutionContext) void
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
FinallyAsync(IExecutionContext) Task
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
GenerateSourceMap(bool) CompileSass
Specifies whether a source map should be generated (the default behavior is false).
IncludeSourceComments(bool) CompileSass
Sets whether the source comments are included (by default they are not).
WithCompactOutputStyle() CompileSass
Sets the output style to compact.
WithCompressedOutputStyle() CompileSass
Sets the output style to compressed.
WithExpandedOutputStyle() CompileSass
Sets the output style to expanded.
WithImportPath(Func<string, string>) CompileSass
A delegate that processes the path in @import statements.
WithIncludePaths(NormalizedPath[]) CompileSass
Adds a list of paths to search while processing includes.
WithInputPath(Config<NormalizedPath>) CompileSass
Specifies a delegate that should be used to get the input path for each input document. This allows the Sass processor to search the right file system and paths for include files. By default, the Source value is used for the input document path.
WithNestedOutputStyle() CompileSass
Sets the output style to nested.

Extension Methods