0

I am using twitter-bootstra-rails gem in my Rails app.

Here is how my manifest (application.css) looks:

 *= require_self
 @import bootstrap_and_overrides;
 *= require dataTables/jquery.dataTables.bootstrap3
 *= require_tree .
 */

However, when trying to use a variable like this:

color: @brand-success; 

I get:

Invalid CSS after "      color: ": expected expression (e.g. 1px, bold), was "@brand-success; "

What am I missing? In the docs it says:

If you are using SASS to compile your application.css (e.g. your manifest file is application.css.sass or application.css.scss) you may get this:

Invalid CSS after "*": expected "{", was "= require twitt..." (in app/assets/stylesheets/application.css) (sass)

If this is the case, you must use @import instead of *= in your manifest file, or don't compile your manifest with SASS.

Hommer Smith
  • 26,772
  • 56
  • 167
  • 296
  • try create a new file called name `whatever.css.scss` and put this `@import "bootstrap_and_overrides";` or if not working change `color: @brand-success;` to `color: $brand-success;` references : [ref 1](http://stackoverflow.com/a/17180681/1297435) & [ref 2](http://stackoverflow.com/a/19792684/1297435) – rails_id Jun 04 '14 at 17:31
  • Looks like you have to use `$brand-success` instead of `@brand-success` – maximus ツ Jun 04 '14 at 17:37
  • Are you using LESS or Sass? You can't really use both together. – cimmanon Jun 04 '14 at 17:38
  • I am using Sass, but as the docs of the gem says, if you want to use the less variables, you have to use @import. That is what I have done, but it is not working. – Hommer Smith Jun 04 '14 at 17:52
  • BTW, Why the downvote guys? – Hommer Smith Jun 04 '14 at 17:52

0 Answers0