The sassc
gem should no longer be used, and will no longer be receiving any updates.
The sass-embedded
gem is the recommended way to move away from sassc
. It bundles the Dart Sass command-line executable, and uses the Embedded Sass Protocol to provide a Modern Ruby API for compiling Sass and defining custom importers and functions.
If you find it difficult migrating to the Modern Ruby API, the sassc-embedded
gem is a drop-in replacement for the sassc
gem. It provides the same Legacy Ruby API, but internally runs sass-embedded
instead of libsass
.
You can also use the dartsass-rails
gem, a basic command-line integration with the Dart Sass executable from the sass-embedded
gem; or dartsass-sprockets
gem, an advanced sprockets integration with the Legacy Ruby API from the sassc-embedded
gem, to plug smoothly into Ruby on Rails.
Alternately, you can explore using a JS build system with Dart Sass as a JavaScript library.
Use libsass
with Ruby!
This gem combines the speed of libsass
, the Sass C implementation, with the ease of use of the original Ruby Sass library.
Add this line to your application's Gemfile:
gem 'sassc'
And then execute:
bundle
Or install it yourself as:
gem install sassc
This library utilizes libsass
to allow you to compile SCSS or SASS syntax
to CSS. To compile, use a SassC::Engine
, e.g.:
SassC::Engine.new(sass, style: :compressed).render
Note: If you want to use this library with Rails/Sprockets, check out sassc-rails.
Additionally, you can use SassC::Sass2Scss
to convert Sass syntax to Scss syntax.
This gem is maintained by Ryan Boland and awesome contributors.
See CHANGELOG.md.
- Clone repo
- Install dependencies -
bundle install
- Run the tests -
bundle exec rake test
- Fork it ( https://github.com/sass/sassc-ruby/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - try to include tests - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request