Current section

Files

Jump to
sass doc Sass.html
Raw

doc/Sass.html

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.13.0">
<title>Sass – Sass.ex v1.0.20</title>
<link rel="stylesheet" href="dist/app-9c1e3d5aa2.css" />
<link rel="canonical" href="https://hexdocs.pm/sass/Sass.html" />
<script src="dist/sidebar_items.js"></script>
</head>
<body data-type="modules">
<script>if(localStorage.getItem('night-mode')) document.body.className += ' night-mode';</script>
<div class="main">
<button class="sidebar-toggle">
<i class="icon-menu"></i>
</button>
<section class="sidebar">
<a href="api-reference.html" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
Sass.ex
</h1>
<h2 class="sidebar-projectVersion">
v1.0.20
</h2>
</div>
<img src="assets/logo.png" alt="Sass.ex" class="sidebar-projectImage">
</a>
<div class="sidebar-search">
<i class="icon-search"></i>
<input type="text" class="sidebar-searchInput" placeholder="search" autocomplete="off" />
</div>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<ul id="full-list" class="sidebar-fullList"></ul>
<div class="sidebar-noResults"></div>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<small class="visible-xs">Sass.ex v1.0.20</small>
Sass
<a href="https://github.com/scottdavis/sass.ex/blob/master/lib/sass.ex#L1" title="View Source" class="view-source" rel="help">
<i class="icon-code"></i>
</a>
</h1>
<section id="moduledoc" class="docstring">
<p>Compiles SASS into CSS using a NIF for Libsass</p>
<h2 id="module-currently-supported-sass-options" class="section-heading">
<a href="#module-currently-supported-sass-options" class="hover-link"><i class="icon-link"></i></a>
Currently supported Sass options
</h2>
<ul>
<li><a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style">output_style</a> Use the helpers below to assign the style</li>
<li>precision <code>integer</code> - decimal rounding percision</li>
<li>source_comments <code>true</code> or <code>false</code> - Causes the line number and file where a selector is defined to be emitted into the compiled CSS as a comment</li>
<li>soure<em>map</em>embed <code>true</code> or <code>false</code></li>
<li>source<em>map</em>contents <code>true</code> or <code>false</code></li>
<li>omit<em>source</em>map_url <code>true</code> or <code>false</code></li>
<li>is<em>indented</em>syntax <code>true</code> or <code>false</code></li>
<li>indent <code>:tab</code> or <code>:space</code></li>
<li>linefeed <code>:unix</code> or <code>:windows</code></li>
<li><p>include_paths list of directorys for Sass to search for imports ex.</p>
<p><code>[&quot;bower_compoents&quot;, &quot;../node_modules&quot;]</code></p></li>
</ul>
</section>
<section id="summary" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#summary">
<i class="icon-link"></i>
</a>
Summary
</h1>
<div class="summary-functions summary">
<h2>
<a href="#functions">Functions</a>
</h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#compile/2">compile(string, options \\ %{output_style: sass_style_nested()})</a>
</div>
<div class="summary-synopsis"><p>Compiles a string of SASS into a string of CSS</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#compile_file/2">compile_file(path, options \\ %{output_style: sass_style_nested()})</a>
</div>
<div class="summary-synopsis"><p>Compiles a file of SASS into a string of CSS</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#sass_style_compact/0">sass_style_compact()</a>
</div>
<div class="summary-synopsis"><p>Sass option value for sass output style <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_15">compact</a></p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#sass_style_compressed/0">sass_style_compressed()</a>
</div>
<div class="summary-synopsis"><p>Sass option value for sass output style <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_16">compressed</a></p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#sass_style_expanded/0">sass_style_expanded()</a>
</div>
<div class="summary-synopsis"><p>Sass option value for sass output style <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_14">expanded</a></p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#sass_style_nested/0">sass_style_nested()</a>
</div>
<div class="summary-synopsis"><p>Sass option value for sass output style <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_13">nested</a></p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#version/0">version()</a>
</div>
<div class="summary-synopsis"><p>Returns current sass version</p>
</div>
</div>
</div>
</section>
<section id="functions" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#functions">
<i class="icon-link"></i>
</a>
Functions
</h1>
<div class="detail" id="compile/2">
<div class="detail-header">
<a href="#compile/2" class="detail-link" title="Link to this function">
<i class="icon-link"></i>
</a>
<span class="signature">compile(string, options \\ %{output_style: sass_style_nested()})</span>
<a href="https://github.com/scottdavis/sass.ex/blob/master/lib/sass.ex#L40" class="view-source" rel="help" title="View Source">
<i class="icon-code"></i>
</a>
</div>
<section class="docstring">
<p>Compiles a string of SASS into a string of CSS</p>
<h2>Parameters</h2>
<ul>
<li>string: Sass String.</li>
<li>options: Map of sass options as defined above</li>
</ul>
<h2>Examples</h2>
<pre><code class="elixir">Sass.compile(&quot;$white : #fff; a { color: $white;}&quot;)
#=&gt; &quot;a { color: #fff; }&quot;
# With Options
Sass.compile(&quot;$white : #fff; a { color: $white;}&quot;, %{output_style: Sass.sass_style_compressed})
#=&gt; &quot;a{color:#fff;}&quot;
</code></pre>
</section>
</div>
<div class="detail" id="compile_file/2">
<div class="detail-header">
<a href="#compile_file/2" class="detail-link" title="Link to this function">
<i class="icon-link"></i>
</a>
<span class="signature">compile_file(path, options \\ %{output_style: sass_style_nested()})</span>
<a href="https://github.com/scottdavis/sass.ex/blob/master/lib/sass.ex#L63" class="view-source" rel="help" title="View Source">
<i class="icon-code"></i>
</a>
</div>
<section class="docstring">
<p>Compiles a file of SASS into a string of CSS</p>
<h2>Parameters</h2>
<ul>
<li>path: Path to sass file to compile.</li>
<li>options: Map of sass options as defined above</li>
</ul>
<h2>Examples</h2>
<pre><code class="elixir">Sass.compile_file(&quot;application.scss&quot;)
#=&gt; &quot;a { color: #fff; }&quot;
# With Options
Sass.compile_file(&quot;application.scss&quot;, %{output_style: Sass.sass_style_compressed})
#=&gt; &quot;a{color:#fff;}&quot;
</code></pre>
</section>
</div>
<div class="detail" id="sass_style_compact/0">
<div class="detail-header">
<a href="#sass_style_compact/0" class="detail-link" title="Link to this function">
<i class="icon-link"></i>
</a>
<span class="signature">sass_style_compact()</span>
<a href="https://github.com/scottdavis/sass.ex/blob/master/lib/sass.ex#L84" class="view-source" rel="help" title="View Source">
<i class="icon-code"></i>
</a>
</div>
<section class="docstring">
<p>Sass option value for sass output style <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_15">compact</a></p>
</section>
</div>
<div class="detail" id="sass_style_compressed/0">
<div class="detail-header">
<a href="#sass_style_compressed/0" class="detail-link" title="Link to this function">
<i class="icon-link"></i>
</a>
<span class="signature">sass_style_compressed()</span>
<a href="https://github.com/scottdavis/sass.ex/blob/master/lib/sass.ex#L88" class="view-source" rel="help" title="View Source">
<i class="icon-code"></i>
</a>
</div>
<section class="docstring">
<p>Sass option value for sass output style <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_16">compressed</a></p>
</section>
</div>
<div class="detail" id="sass_style_expanded/0">
<div class="detail-header">
<a href="#sass_style_expanded/0" class="detail-link" title="Link to this function">
<i class="icon-link"></i>
</a>
<span class="signature">sass_style_expanded()</span>
<a href="https://github.com/scottdavis/sass.ex/blob/master/lib/sass.ex#L80" class="view-source" rel="help" title="View Source">
<i class="icon-code"></i>
</a>
</div>
<section class="docstring">
<p>Sass option value for sass output style <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_14">expanded</a></p>
</section>
</div>
<div class="detail" id="sass_style_nested/0">
<div class="detail-header">
<a href="#sass_style_nested/0" class="detail-link" title="Link to this function">
<i class="icon-link"></i>
</a>
<span class="signature">sass_style_nested()</span>
<a href="https://github.com/scottdavis/sass.ex/blob/master/lib/sass.ex#L76" class="view-source" rel="help" title="View Source">
<i class="icon-code"></i>
</a>
</div>
<section class="docstring">
<p>Sass option value for sass output style <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_13">nested</a></p>
</section>
</div>
<div class="detail" id="version/0">
<div class="detail-header">
<a href="#version/0" class="detail-link" title="Link to this function">
<i class="icon-link"></i>
</a>
<span class="signature">version()</span>
<a href="https://github.com/scottdavis/sass.ex/blob/master/lib/sass.ex#L71" class="view-source" rel="help" title="View Source">
<i class="icon-code"></i>
</a>
</div>
<section class="docstring">
<p>Returns current sass version</p>
</section>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" rel="help" target="_blank">ExDoc</a> (v0.13.0),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
<button class="night-mode-toggle" />
</footer>
</div>
</div>
</section>
</div>
<script src="dist/app-21f1a20b9e.js"></script>
</body>
</html>