# Class _Sass.Compiler

Inheritance graph

Description

  Sass/SCSS compiler.

Example

      Web.Sass.Compiler compiler = Web.Sass.Compiler();

      // Allow for HTTP imports, disallowed by default.
      compiler->http_import = Web.Sass.HTTP_IMPORT_ANY;

      // Minify the output and create a source map file.
      compiler->set_options(([
        "output_style" : Web.Sass.STYLE_COMPRESSED,
        "source_map_file" : "path/to/write/source.map"
      ]));

      if (mixed e = catch(compiler->compile_file("input.scss", "output.css"))) {
        werror("Failed compiling input.scss to output.css\n");
      }

Variable check_file_access

  ```bool`` _Sass.Compiler.check_file_access`

Description

  Should file access be tested right away when paths are set or should that be left to Sass to handle? The default value is `true`.

Variable http_import

  ``int(0..2)` _Sass.Compiler.http_import`

Description

  If a Sass file is importing an external URI this flag determines if thats allowed at all, or if the content type of the imported file has to be in http_import_allow_ct, or if anything goes. Default is `HTTP_IMPORT_NONE`.

See also

  `HTTP_IMPORT_NONE`, `HTTP_IMPORT_GREEDY` and `HTTP_IMPORT_ANY`.

Variable http_import_allow_ct

  ``multiset`(`s8`) _Sass.Compiler.http_import_allow_ct`

Description

  List of allowed content types if http_import is set to `HTTP_IMPORT_GREEDY`. The default is to allow `text/scss` and `text/sass`.

Inherit Api

  `inherit `Api` : Api`