Reputation: 11293
Is it possible to import a stylesheet from a rails-assets.org gem using scss's import
instead of sprocket's require
? For example:
Given this Gemfile
:
source 'https://rails-assets.org'
gem "rails-assets-RRSSB"
Using a sprockets stylesheet, normally you'd use a require
in application.css
(working):
*= require RRSSB/scss/rrssb
However, I'm using SCSS and would like to use import
in application.css.scss
(not working):
@import "RRSSB/scss/rrssb";
Upvotes: 1
Views: 265
Reputation: 2727
rvm gemdir
) and look for the gem rails-assets
pulled (/gems/rails-assets-YOUR_GEM-VERSION
).app/assets/stylesheets
directory find your file.app/assets/stylesheets
.The same goes for javascripts (in app/assets/javascripts
).
This worked for me with rails-assets-bootstrap-sass-official
, the file I was trying to import was bootstrap-sporckets
and it was (including all other files) under app/assets/stylesheets/bootstrap-sass-official
so my import was:
@import "bootstrap-sass-official/bootstrap-sprockets"
Upvotes: 2