Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3: What CSS styles are expected by Rails?

I am creating a custom CSS stylesheet for a Rails 3 application.

Is there a list anywhere of the CSS styles that Rails relies upon? So far I have found:

  • #notice
  • #error_explanation
  • .field_with_errors

Many thanks.

like image 851
gjb Avatar asked Feb 25 '23 08:02

gjb


1 Answers

The css for the flash-messages you can choose yourself, as they are normally defined in application.html.erb (there is no default definition for flash-messages in rails 3).

For form-styling i would recommend using a gem like formtastic, which not only greatly simplifies making forms, but also provides a standard css file. So all needed tags are then known (and can be overwritten if needed).

If on the other hand you are looking at ways to get your complete layout started quickly, you might want to checkout web-app-theme or activo (which is even more complete).

like image 171
nathanvda Avatar answered Mar 11 '23 13:03

nathanvda