Embedded Sass Polyfill for SassC Ruby
Use sass-embedded
with SassC Ruby!
This library polyfills sassc
with the sass-embedded
implementation.
Install
Add these lines to your application’s Gemfile:
gem 'sassc', github: 'sass/sassc-ruby', ref: 'refs/pull/233/head' gem 'sassc-embedded'
And then execute:
bundle
Or install it yourself as:
gem install sassc-embedded
Usage
This polyfill utilizes sass-embedded
to allow you to compile SCSS or SASS syntax to CSS. To compile, use a SassC::Engine
, e.g.:
require 'sassc-embedded' SassC::Engine.new(sass, style: :compressed).render
See rubydoc.info/gems/sassc for full API documentation.
Behavioral Differences from SassC Ruby
Option
:style => :nested
behaves as:expanded
.Option
:style => :compact
behaves as:compressed
.Option
:precision
is ignored.Option
:line_comments
is ignored.In
Importer#imports(path, parent_path)
, argumentpath
is set to absolute path, and argumentparent_path
is set to value of option:filename
.
See the dart-sass documentation for other differences.