Compile Topic

APIs for compiling Sass source files to CSS, and providing options for that compilation.

Classes

AsyncCallable Compile
An interface for functions and mixins that can be invoked from Sass by passing in arguments. [...]
Callable Compile
An interface for functions and mixins that can be invoked from Sass by passing in arguments. [...]
CompileResult Compile
The result of compiling a Sass document to CSS, along with metadata about the compilation process.
Logger Compile
An interface for loggers that print messages produced by Sass stylesheets. [...]
OutputStyle Compile
An enum of generated CSS styles.
Syntax Compile
An enum of syntaxes that Sass can parse.

Functions

compile(String path, {bool color = false, Logger? logger, Iterable<Importer>? importers, Iterable<String>? loadPaths, PackageConfig? packageConfig, Iterable<Callable>? functions, OutputStyle? style, bool quietDeps = false, bool verbose = false, void sourceMap(SingleMapping map)?, bool charset = true}) String Compile
Like compileToResult, but returns CompileResult.css rather than returning CompileResult directly. [...]
@Deprecated("Use compileToResult() instead.")
compileAsync(String path, {bool color = false, Logger? logger, Iterable<AsyncImporter>? importers, PackageConfig? packageConfig, Iterable<String>? loadPaths, Iterable<AsyncCallable>? functions, OutputStyle? style, bool quietDeps = false, bool verbose = false, void sourceMap(SingleMapping map)?}) Future<String> Compile
Like compile, except it runs asynchronously. [...]
@Deprecated("Use compileToResultAsync() instead.")
compileString(String source, {Syntax? syntax, bool color = false, Logger? logger, Iterable<Importer>? importers, PackageConfig? packageConfig, Iterable<String>? loadPaths, Iterable<Callable>? functions, OutputStyle? style, Importer? importer, Object? url, bool quietDeps = false, bool verbose = false, void sourceMap(SingleMapping map)?, bool charset = true, bool indented = false}) String Compile
Like compileStringToResult, but returns CompileResult.css rather than returning CompileResult directly. [...]
@Deprecated("Use compileStringToResult() instead.")
compileStringAsync(String source, {Syntax? syntax, bool color = false, Logger? logger, Iterable<AsyncImporter>? importers, PackageConfig? packageConfig, Iterable<String>? loadPaths, Iterable<AsyncCallable>? functions, OutputStyle? style, AsyncImporter? importer, Object? url, bool quietDeps = false, bool verbose = false, void sourceMap(SingleMapping map)?, bool charset = true, bool indented = false}) Future<String> Compile
Like compileString, except it runs asynchronously. [...]
@Deprecated("Use compileStringToResultAsync() instead.")
compileStringToResult(String source, {Syntax? syntax, bool color = false, Logger? logger, Iterable<Importer>? importers, PackageConfig? packageConfig, Iterable<String>? loadPaths, Iterable<Callable>? functions, OutputStyle? style, Importer? importer, Object? url, bool quietDeps = false, bool verbose = false, bool sourceMap = false, bool charset = true}) CompileResult Compile
Compiles source to CSS and returns a CompileResult containing the CSS and additional metadata about the compilation.. [...]
compileStringToResultAsync(String source, {Syntax? syntax, bool color = false, Logger? logger, Iterable<AsyncImporter>? importers, PackageConfig? packageConfig, Iterable<String>? loadPaths, Iterable<AsyncCallable>? functions, OutputStyle? style, AsyncImporter? importer, Object? url, bool quietDeps = false, bool verbose = false, bool sourceMap = false, bool charset = true}) Future<CompileResult> Compile
Like compileStringToResult, except it runs asynchronously. [...]
compileToResult(String path, {bool color = false, Logger? logger, Iterable<Importer>? importers, Iterable<String>? loadPaths, PackageConfig? packageConfig, Iterable<Callable>? functions, OutputStyle? style, bool quietDeps = false, bool verbose = false, bool sourceMap = false, bool charset = true}) CompileResult Compile
Loads the Sass file at path, compiles it to CSS, and returns a CompileResult containing the CSS and additional metadata about the compilation. [...]
warn(String message, {bool deprecation = false}) → void Compile
Prints a warning message associated with the current @import or function call. [...]

Exceptions / Errors

SassException Compile
An exception thrown by Sass.