Ester Lin
Ester Lin

Reputation: 617

Rails: Assets/stylesheets/application.scss formatting not applied to view

This is my application.scss file:

@import "bootstrap-sprockets";
@import "bootstrap";

.fav_yes {
  color: white;
  background-color: red;
}

.navigation {
  color:green;
};

Yet when I have elements with class="fav_yes" in my views I'm still not seeing the styled html. I tried messing around with semicolons and whatnot with no luck. No similar questions seem to provide effective solutions. What am I missing?

Upvotes: 1

Views: 61

Answers (2)

Ester Lin
Ester Lin

Reputation: 617

From the bootstrap-saas git-hub write up:

If you have just generated a new Rails app, it may come with a .css file instead. If this file exists, it will be served instead of Sass, so rename it:

I still had an application.css file, so the .scss was being overriden. I just copied and pasted content of the .scss into .css, deleted the .scss file and renamed the the .css file to .scss.

Upvotes: 1

mrvncaragay
mrvncaragay

Reputation: 1260

you forgot to add this to your application.js: //= require bootstrap-sprockets

make sure it is under //= require jquery

Upvotes: 0

Related Questions