Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails: Twitter Bootstrap Buttons when visited get black text color

I have a rails 3.2 app using Twitter Bootstrap via the gem 'twitter-bootstrap-rails'. Additionally the forms are created with the SimpleForm gem For a number of the pages I've used the twitter buttons on the form via

<%= link_to "Back", :back, :class => 'btn btn-warning'%>
<%= form.button :submit, :class => 'btn btn-primary' %>

The buttons are rendered ok. The issue is that after you select one of the buttons, which visits the link, on returning to the page the text is stuck on the greyed out version as shown below for the 'back' button:

twitter buttons

This causes a problem, especially on the buttons styled with 'btn-primary' as the text is hard to read. An example of this is below:

edit button

Wondering what setting needs to change and where. I expected it should be in the bootstrap_and_overrides.css.less file but not sure what setting to try. Tests on @linkColorHover didn't work.

Any thoughts ?

like image 913
Grant Sayer Avatar asked May 31 '12 08:05

Grant Sayer


1 Answers

The best solution I found for this problem is to remove scaffolds.css.scss in the app/assets/stylesheets directory as suggested by @tonymarschall above in the comments.

like image 103
Alexander Suraphel Avatar answered Nov 15 '22 20:11

Alexander Suraphel