I am using bootstrap-sass
in a Rails application. So far, everything has worked fine, but I have just tried to import another third-party sass file that uses bootstrap variables and it cannot see them.
In my application.css.scss
*= require bootstrap_local
In bootstrap_local.css.scss
@import "bootstrap";
@import "bootstrap-social";
When I do a page access, I get a Rails error
Undefined variable: "$line-height-computed".
(in .../app/assets/stylesheets/bootstrap-social.scss:11)
The variable needed by bootstrap-social.scss
is defined in the previously imported bootstrap
file (in fact it's defined in a partial bootstrap/variables
that it includes).
As far as I understand, this should work because bootstrap_local
is required, which means that everything in it is compiled together in one scope, so everything imported into bootstrap_local
is treated as being one large file. Perhaps I have this wrong?
If I throw an @import "bootstrap";
into bootstrap-social.scs
then it works fine. But I should not need to do this, so I either doing something wrong or I there is some misconfiguration with my setup.
What do I need to do to fix this?
Gems:
- bootstrap-sass-3.1.1.1
- sass-rails-4.0.3
System:
- Rails 4.0.1
- ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
(Bootstrap Social is a set of social sign-in buttons made in pure CSS based on Bootstrap and Font Awesome.)