seyhunak / twitter-bootstrap-rails

Twitter Bootstrap for Rails 6.0, Rails 5 - Rails 4.x Asset Pipeline
https://github.com/seyhunak/twitter-bootstrap-rails
4.5k stars 1k forks source link

Switch to SASS from LESS #870

Open Extrapolator214 opened 8 years ago

Extrapolator214 commented 8 years ago

I don't know if this was addressed before, but is there any possibility to switch to SASS from LESS? There is an official port to SASS: https://github.com/twbs/bootstrap-sass I would really like to have access to the amazing generators and helpers of 'twitter-bootstrap-rails' while working with SASS. SASS is the default Rails CSS pre-processor, it would be logical to use it.

I'll appreciate any suggestions how to combine this gem with SASS.

Extrapolator214 commented 8 years ago

Actually I've just found a way:

# Gemfile
gem "twitter-bootstrap-rails"
gem 'sass-rails'
gem 'bootstrap-sass'

I simply didn't run 'rails generate bootstrap:install' from "twitter-bootstrap-rails" Instead I followed the installation from https://github.com/twbs/bootstrap-sass#a-ruby-on-rails

Basically the CSS/JS part is done with 'bootstrap-sass' while the themed generators and helpers are available from 'twitter-bootstrap-rails'.

whartonn commented 8 years ago

Solutions will become important for the future - as the Bootstrap team has announced that Bootstrap v4 will move from using LESS to SASS: http://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/ Thank you for this project!

bdewater commented 8 years ago

The Bootstrap team will package v4 as a gem, so this gem could provide the Rails integration? See https://github.com/twbs/bootstrap-rubygem/issues/6