Permalink
Browse files

no need for yahoo's reset.css any more... doing my own resets

  • Loading branch information...
1 parent ef95eff commit 519b640215ed5ec111761112968ef688dca2e8e3 @justinfrench committed Jul 4, 2008
Showing with 14 additions and 6 deletions.
  1. +1 −2 README.textile
  2. +13 −4 generators/formtastic_stylesheets/templates/formtastic.css
View
@@ -175,10 +175,9 @@ A proof-of-concept (very much a work-in-progress) stylesheet is provided which y
./script/generate formtastic_stylesheets
</pre>
-2. Add both YUI's reset.css, formtastic.css and formtastic_changes.css to your layout:
+2. Add both formtastic.css and formtastic_changes.css to your layout:
<pre>
-<%= stylesheet_link_tag "http://yui.yahooapis.com/2.5.1/build/reset/reset-min.css" %>
<%= stylesheet_link_tag "formtastic" %>
<%= stylesheet_link_tag "formtastic_changes" %>
</pre>
@@ -4,17 +4,26 @@ It's *strongly* suggested that you don't modify this file. Instead, load a new
this one in your layouts (eg formtastic_changes.css) and override the styles to suit your needs.
This will allow you to update formtastic.css with new releases without clobbering your own changes.
-This assumes you're also using the YUI reset stylesheet:
-http://yui.yahooapis.com/2.5.1/build/reset/reset-min.css
-
This stylesheet forms part of the Formtastic Rails Plugin
(c) 2008 Justin French
--------------------------------------------------------------------------------------------------*/
+/* NORMALIZE AND RESET
+--------------------------------------------------------------------------------------------------*/
-div.fieldWithErrors { display:inline; }
+/* obviously inspired by Yahoo's reset.css, but scoped to just form.formtastic elements that we care about */
+form.formtastic, form.formtastic ul, form.formtastic ol, form.formtastic li, form.formtastic fieldset, form.formtastic legend, form.formtastic input, form.formtastic textarea, form.formtastic p { margin:0; padding:0; border:0; }
+form.formtastic em, form.formtastic strong { font-style:normal; font-weight:normal; }
+form.formtastic li { list-style:none; }
+form.formtastic abbr, form.formtastic acronym { border:0;font-variant:normal; }
+form.formtastic input, form.formtastic textarea, form.formtastic select { font-family:inherit; font-size:inherit; font-weight:inherit; }
+form.formtastic input, form.formtastic textarea, form.formtastic select { *font-size:100%; }
+form.formtastic legend { color:#000; }
+
+/* Rails wraps error fields with divs */
+div.fieldWithErrors { display:inline; margin:0; padding:0; }
/* FIELDSETS & LISTS

0 comments on commit 519b640

Please sign in to comment.