After installing the styled_objects plugin (see Installing), add this line inside your application layout templatetag:
<%= so_stylesheet_link_tag %>
Note: This part is independent from styled_objects, but I recomend following these steps.
If you are starting the app from scratch, I recommend:
1. installing three stylesheet files (that you can later compile into one) into your public stylesheet path
For more good OO-CSS guidelines watch this presentation.
2. creating the respective stylesheet link tags in your application layout templates using the
stylesheet_link_tag rails helper.
Every time you create one template or partial and need styling it, create a corresponding template alongside.
Example of a view directory tree:
------ views +---- foo +--- index.html.erb +--- index.css +--- _my_partial.html.erb +--- _my_partial.css +---- bar +--- show.html.erb +--- show.css +--- _my_other_partial.html.erb +--- _my_other_partial.css
styled_objects will, for each page compile the needed css files into one file.
» Next: CSS file syntax
Last edited by pgte,