SassEx (sass_ex v0.1.1) 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
Functions
Compile the content
string.
Link to this section Functions
Specs
compile(binary(), SassEx.Processor.compile_opts()) :: {:ok, SassEx.Response.t()} | {:error, String.t(), Sass.EmbeddedProtocol.OutboundMessage.CompileResponse.CompileFailure.t()}
Compile the content
string.
Examples
SassEx.compile(content, source_map: true, style: :expanded)
Options
:style
- Either:expanded
or:compressed
. Defaults to:expanded
:source_map
- True if the compilation should include a source map. Defaults tofalse
:syntax
- Either:css
for raw CSS,:scss
for SCSS format, or:sass
for SASS/embedded format. Defaults to:scss
:importers
- List of custom importers. SeeSassEx.Importer
for more information