twbs / bootstrap-sass

Official Sass port of Bootstrap 2 and 3.
http://getbootstrap.com/css/#sass
MIT License
12.59k stars 3.53k forks source link

replace sass with sassc #1156

Closed dennisvandehoef closed 6 years ago

dennisvandehoef commented 6 years ago

Replace the usage of the sass gem with the sassc gem, as suggested in the end-of-life blog post: http://sass.logdown.com/posts/7081811

According to this benchmark, it also might speed up the sass compilation time as an extra win: https://marianposaceanu.com/articles/making-rails-asset-pipeline-faster

michaelhiiva commented 6 years ago

Yes, the sass gem should be replaced because it will soon be outdated and the sassc gem is recommended for Ruby installs. But making this change would require quite a few changes in the documentation, code and tests. I would like try and address this in a pull request if the sassc gem change is agreed upon.

Also, the change is noted on Ruby Sass that it will be depreciated in one year after the release of Dart Sass and users of the sass gem need to migrate. In addition, to the sassc gem being recommended.

If you use the sass gem as a library, the sassc gem is the most seamless way to move away from Ruby Sass. It uses LibSass to provide the same API for compiling Sass and defining custom functions as Ruby Sass, except that it uses the SassC module instead of Sass. However, it doesn't yet support the same Importer API. You can also use the sassc-rails gem to plug smoothly into Ruby on Rails.

mokolabs commented 6 years ago

FWIW, I don't think adding sassc support will be that difficult -- at least on the 2.X branch.

My app is stuck on Bootstrap 2.3, but I wanted sassc support... so I cloned the current gem, rolled back to the original 2.3 release commit (since there is no tracking branch for 2.3), and then added sassc.

You can see it here: https://github.com/mokolabs/bootstrap-sass-2.3-with-sassc-rails

mileslane commented 6 years ago

What is the status of this?

mokolabs commented 6 years ago

Sweet. Thanks, @glebm!