Permalink
Browse files

updated README for asset pipeline with ie6 & 7 css

  • Loading branch information...
1 parent 3829a49 commit 28754a29b3b8eb51ad11abc1e5db89ca603869de @justinfrench committed Jun 2, 2011
Showing with 19 additions and 2 deletions.
  1. +19 −2 README.textile
View
@@ -112,7 +112,7 @@ Optionally, run the generator to copy a stylesheet (Rails 3.0.x only) and a conf
h2. Stylesheets
-A proof-of-concept stylesheet is provided which you can include in your layout. Customization is best achieved by overriding these styles in an additional stylesheet.
+A proof-of-concept set of stylesheets are provided which you can include in your layout. Customization is best achieved by overriding these styles in an additional stylesheet.
h3. Stylesheet usage in Rails < 3.1:
@@ -123,17 +123,34 @@ h3. Stylesheet usage in Rails < 3.1:
<pre>
# app/views/layouts/application.html.erb
<%= stylesheet_link_tag 'formtastic', 'my_formtastic_changes' %>
+ <!--[if IE 6]><%= stylesheet_link_tag 'formtastic_ie6' %><![endif]-->
+ <!--[if IE 7]><%= stylesheet_link_tag 'formtastic_ie7' %><![endif]-->
</pre>
h3. Stylesheet usage in Rails >= 3.1:
-Rails 3.1 introduces an asset pipeline that allows plugins like Formtastic to serve their own Stylesheets, Javascripts, etc without having to run generators that copy them accross to the host application.
+Rails 3.1 introduces an asset pipeline that allows plugins like Formtastic to serve their own Stylesheets, Javascripts, etc without having to run generators that copy them accross to the host application. Formtastic makes three stylesheets available as an Engine, you just need to require them in your global stylesheets.
<pre>
# app/assets/stylesheets/application.css
*= require formtastic
+ *= require my_formtastic_changes
+
+ # app/assets/stylesheets/ie6.css
+ *= require formtastic_ie6
+
+ # app/assets/stylesheets/ie7.css
+ *= require formtastic_ie7
</pre>
+<pre>
+ # app/views/layouts/application.html.erb
+ <%= stylesheet_link_tag 'application' %>
+ <!--[if IE 6]><%= stylesheet_link_tag 'ie6' %><![endif]-->
+ <!--[if IE 7]><%= stylesheet_link_tag 'ie7' %><![endif]-->
+</pre>
+
+
h2. Usage

0 comments on commit 28754a2

Please sign in to comment.