A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://sass-lang.com/documentation/js-api/functions/compileStringAsync below:

Website Navigation


Sass: compileStringAsync | JS API

Compatibility:

Dart Sass
since 1.45.0

Node Sass

Asynchronously compiles a stylesheet whose contents is source to CSS. Returns a promise that resolves with a CompileResult if it succeeds and rejects with an Exception if it fails.

This only allows synchronous or asynchronous Importers and CustomFunctions.

⚠️ Heads up!

When using the sass npm package, compileString is almost twice as fast as compileStringAsync, due to the overhead of making the entire evaluation process asynchronous.

Example
const sass = require('sass');

const result = await sass.compileStringAsync(`


h1 {
font-size: 40px;
code {
font-face: Roboto Mono;
}
}`);
console.log(result.css);

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4