webdev_sass_compiler
Compile SCSS or SASS source code into plain CSS. Resolve variables, nesting, mixins, and partials with selectable output styles and optional inline source maps.
Instructions
SCSS / SASS to CSS Compiler. Compile SCSS or indented-SASS source into plain CSS, resolving variables, nesting, mixins, and partials, with a choice of output styles (expanded, compressed, compact, nested) and optional inline source maps. Use this to turn a preprocessor stylesheet into deliverable CSS; use webdev_css_minifier instead when the input is already plain CSS you only want shrunk, or webdev_code_formatter to pretty-print CSS/HTML/JS. The server runs the Dart Sass CLI on the source you submit and returns the compiled CSS; remote @import and load-path lookups are disabled, so it reads no files off the host and contacts no external service. Read-only and non-destructive, rate-limited to 30 requests per minute for anonymous callers. Returns the compiled CSS, the echoed source, an optional source map, and size statistics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sass | Yes | SCSS or SASS source code to compile. Must not be blank; an empty value is rejected. | |
| syntax | No | Source syntax: scss for brace-and-semicolon SCSS, sass for the indented SASS syntax. Sets the temp file extension passed to the compiler. | scss |
| outputStyle | No | CSS formatting style forwarded to Dart Sass via the style flag. expanded is human-readable; compressed is minified. | expanded |
| sourceMap | No | When true, generate a source map and return its JSON in the sourceMap field. | |
| includePaths | No | Accepted and echoed for compatibility but ignored by the compiler (load paths are disabled for security, so remote or host @import lookups never run). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| original | No | The submitted SCSS/SASS source, echoed back. | |
| compiled | No | The compiled CSS output. | |
| syntax | No | The source syntax used (scss or sass). | |
| outputStyle | No | The output style applied (expanded, compressed, compact, or nested). | |
| sourceMap | No | Source map JSON when sourceMap was requested and produced, otherwise null. | |
| hasSourceMap | No | Whether a source map is present in this response. | |
| originalSize | No | Character length of the original source. | |
| compiledSize | No | Character length of the compiled CSS. | |
| compressionRatio | No | Size change as a percentage of the original length. | |
| error | No | Present only on failure (HTTP 400/500): a cleaned compilation error message. |