class Sass::Compiler

def compile_string(source,

Other tags:
    See: https://sass-lang.com/documentation/js-api/functions/compilestring/ -

Raises:
  • (ArgumentError, CompileError, IOError) -

Returns:
  • (CompileResult) -

Parameters:
  • verbose (Boolean) -- By default, Dart Sass will print only five instances of the same deprecation warning per
  • silence_deprecations (Array) -- A set of active deprecations to ignore.
  • quiet_deps (Boolean) -- If this option is set to +true+, Sass won’t print warnings that are caused by
  • logger (Object) -- An object to use to handle warnings and/or debug messages from Sass.
  • future_deprecations (Array) -- A set of future deprecations to opt into early.
  • fatal_deprecations (Array) -- A set of deprecations to treat as fatal.
  • alert_color (Boolean) -- If this is +true+, the compiler will use ANSI color escape codes in its error and
  • alert_ascii (Boolean) -- If this is +true+, the compiler will exclusively use ASCII characters in its error
  • importers (Array) -- Custom importers that control how Sass resolves loads from rules like
  • functions (Hash) -- Additional built-in Sass functions that are available in all stylesheets.
  • style (Symbol) -- The OutputStyle of the compiled CSS.
  • source_map_include_sources (Boolean) -- Whether Sass should include the sources in the generated source map.
  • source_map (Boolean) -- Whether or not Sass should generate a source map.
  • charset (Boolean) -- By default, if the CSS document contains non-ASCII characters, Sass adds a +@charset+
  • url (String) -- The canonical URL of the entrypoint stylesheet. If this is passed along with +importer+, it's
  • syntax (Symbol) -- The Syntax to use to parse the entrypoint stylesheet.
  • load_paths (Array) -- Paths in which to look for stylesheets loaded by rules like
  • importer (Object) -- The importer to use to handle loads that are relative to the entrypoint stylesheet.
  • source (String) --
  • def compile_string(source,
                       importer: nil,
                       load_paths: [],
                       syntax: :scss,
                       url: nil,
                       charset: true,
                       source_map: false,
                       source_map_include_sources: false,
                       style: :expanded,
                       functions: {},
                       importers: [],
                       alert_ascii: false,
                       alert_color: nil,
                       fatal_deprecations: [],
                       future_deprecations: [],
                       logger: nil,
                       quiet_deps: false,
                       silence_deprecations: [],
                       verbose: false)
      raise ArgumentError, 'source must be set' if source.nil?
      Host.new(@channel).compile_request(
        path: nil,
        source:,
        importer:,
        load_paths:,
        syntax:,
        url:,
        charset:,
        source_map:,
        source_map_include_sources:,
        style:,
        functions:,
        importers:,
        alert_color:,
        alert_ascii:,
        fatal_deprecations:,
        future_deprecations:,
        logger:,
        quiet_deps:,
        silence_deprecations:,
        verbose:
      )
    end