问题
I have a application.css.scss with the following content -
@import bootstrap
Now I would like to use the chosen-rails gem, and add the following sprokets directive to my application.css.scss file -
*= require chosen
I installed the sprockets-sass gem, and changed my application.css.scss file to -
@import bootstrap
//*= require chosen
However I dont see the chosen css appear, what am I doing wrong?
回答1:
Try using only the @import
syntax:
@import 'bootstrap'
@import 'chosen'
The 'sass-rails' gem instructs not use the require
syntax in SASS files.
来源:https://stackoverflow.com/questions/12072080/how-to-use-sprockets-imports-with-sass