SassEx (sass_ex v0.1.0) View Source

Sass/SCSS compiler for elixir that leverages the embedded sass protocol to interoperate with Dart Sass.

Basic Usage

iex> SassEx.compile(".example { color: red; }")
{:ok, %SassEx.Response{css: ".example {\n  color: red;\n}", source_map: ""}}

Link to this section Summary


Compile the content string.

Link to this section Functions

Link to this function

compile(content, opts \\ [])

View Source


compile(binary(), SassEx.Processor.compile_opts()) ::
  {:ok, SassEx.Response.t()}
  | {:error, String.t(),

Compile the content string.


SassEx.compile(content, source_map: true, style: :expanded)


  • :style - Either :expanded or :compressed. Defaults to :expanded
  • :source_map - True if the compilation should include a source map. Defaults to false
  • :syntax - Either :css for raw CSS, :scss for SCSS format, or :sass for SASS/embedded format. Defaults to :scss
  • :importers - List of custom importers. See SassEx.Importer for more information