Reputation: 8998
In my navbar I have the following:
Signed in as <%= link_to current_user.name, edit_password_path(current_user) %> |
<%= link_to "Sign out", destroy_user_session_path, :method => :delete %>
But the text appears black for the link. I have the following in my bootstrap and overrides CSS file:
@navbarLinkColor: @grayLight;
@navbarLinkColorHover: @grayLight;
@navbarLinkColorActive: @grayLight;
The resulting html looks like:
<p class="navbar-text pull-right">
Signed in as <a href="/password/8/edit">Test</a> |
<a href="/users/sign_out" data-method="delete" rel="nofollow">Sign out</a>
</p>
So why isn't it working? I am using Twitter Bootstrap Rails Gem in my application.
Upvotes: 0
Views: 2563
Reputation: 4419
Maybe you have a scaffold.css. Delete it. Bootstrap doesn't work correctly with it
Upvotes: 1
Reputation: 3345
I had an issue trying to change all of the link colors in bootstrap and setting these in the bootstrap-overides-and-css file didn't seem to do anything. Referencing these variables at the top of you custom.css file or your main css file did the trick for me.
So place the variables at the top of your main stylesheet before importing bootstrap like so.
custom.css
$linkColor: #EDDA74;
$linkColorHover: #D4A017;
@import "bootstrap";
/* mixins, variables, etc. */
Note. I also had to change the @ to $ for global variables.
Hope it helps.
Upvotes: 3