how to use sprockets imports with sass

蓝咒 提交于 2019-12-11 13:00:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!