sass library Null safety

We strongly recommend importing this library with the prefix sass.

Classes

AsyncCallable Compile
An interface for functions and mixins that can be invoked from Sass by passing in arguments. [...]
AsyncImporter Importer
An interface for importers that resolves URLs in @imports to the contents of Sass files. [...]
CalculationInterpolation Value
A string injected into a SassCalculation using interpolation. [...]
CalculationOperation Value
A binary operation that can appear in a SassCalculation.
CalculationOperator Value
An enumeration of possible operators for CalculationOperation.
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.
FilesystemImporter Importer
An importer that loads files from a load path on the filesystem.
Importer Importer
An interface for importers that resolves URLs in @imports to the contents of Sass files. [...]
ImporterResult Importer
The result of importing a Sass stylesheet, as returned by Importer.load.
ListSeparator Value
An enum of list separator types.
Logger Compile
An interface for loggers that print messages produced by Sass stylesheets. [...]
OutputStyle Compile
An enum of generated CSS styles.
PackageImporter Importer
An importer that loads stylesheets from package: imports.
SassArgumentList Value
A SassScript argument list. [...]
SassBoolean Value
A SassScript boolean value.
SassCalculation Value
A SassScript calculation. [...]
SassColor Value
A SassScript color.
SassFunction Value
A SassScript function reference. [...]
SassList Value
A SassScript list.
SassMap Value
A SassScript map.
SassNumber Value
A SassScript number. [...]
SassString Value
A SassScript string. [...]
Syntax Compile
An enum of syntaxes that Sass can parse.
Value Value
A SassScript value. [...]

Constants

sassFalse → const SassBoolean Value
The SassScript false value. [...]
SassBoolean._(false)
sassNull → const Value Value
The SassScript null value. [...]
_SassNull()
sassTrue → const SassBoolean Value
The SassScript true value. [...]
SassBoolean._(true)

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. [...]
compileToResultAsync(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, bool sourceMap = false}) Future<CompileResult>
Like compileToResult, except it runs asynchronously. [...]
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.