Sign in through GitHub

RailsCasts Pro episodes are now free!

Learn more or hide this

Jeff's Profile

GitHub User: TechCanuck

Comments by Jeff

Avatar

This cast is awesome, even years later as it truly helps out!

As an add-on question to developing with this, I'd like to know the following as I'm struggling with it. If you're ADDING to an existing library (ie., extending a bootstrap CSS file), then it look like the sprockets library is ALWAYS needed at the top of your SCSS files. Attempted to add in the sprockets by default in the application.css file, but it looks like the pre-parsers error - as it cannot locate the $gray-medium-light: variable in bootstrap when running. Only when the IMPORT lines are pre-pended in the file does it actually run. Is this really needed in each/every one of my CSS files which overload/extend bootstrap?

Example (in application.css) -- which I thought would globally load the bootstrap.css

*= require_bootstrap

Example of my file after having to add the @import to my css file

<--- MYFILE.CSS.SCSS --->
@import "bootstrap-sprockets";
@import "bootstrap";

/* universal */
$gray-medium-light: #eaeaea;
<------ >

Any ideas on how to get bootstrap to load globally so I can extend it in my CSS files?