<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -7,15 +7,28 @@ module ActionView
       #
       # 
       #
-      def clear(what = 'both', height = '0')
-        unless %w[left right both].include?(what.to_s)
-          height = what
-          what = 'both'
+      def clear(clear = 'both', height = '0')
+        options = {}
+        if clear.is_a?(Hash)
+          options = clear.stringify_keys.reverse_merge!('clear' =&gt; 'both', 'height' =&gt; '0')
+        else
+          unless %w[left right both].include?(clear.to_s)
+            height = clear
+            clear = 'both'
+          end
+          options['height'] = height
+          options['clear'] = clear
         end
-        if height.to_i.to_s == height.to_s
-          height = &quot;#{height}px&quot; unless height.to_s == '0'
+        if options['height'].to_i.to_s == options['height'].to_s
+          options['height'] = &quot;#{options['height']}px&quot; unless options['height'].to_s == '0'
         end
-        %Q{&lt;div style=&quot;clear:#{what}; height: #{height}; max-height: #{height}; font-size: #{height}; line-height: #{height};&quot;&gt;&amp;nbsp;&lt;/div&gt;}
+
+        options.reverse_merge!('max-height' =&gt; options['height'],
+                               'font-size' =&gt; options['height'],
+                               'line-height' =&gt; options['height'])
+
+        # the sort is really just so the tests pass easily
+        %Q{&lt;div style=&quot;#{options.map {|e| &quot;#{e.first}: #{e.last}&quot; }.sort.join('; ')}&quot;&gt;&amp;nbsp;&lt;/div&gt;}
       end
 
     end</diff>
      <filename>lib/clear_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,11 +7,15 @@ class ClearHelperTest &lt; Test::Unit::TestCase
   include ActionView::Helpers::TagHelper
 
   def test_clear_helper
-    assert_equal '&lt;div style=&quot;clear:both; height: 0; max-height: 0; line-height: 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear
-    assert_equal '&lt;div style=&quot;clear:left; height: 0; max-height: 0; line-height: 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear(:left)
-    assert_equal '&lt;div style=&quot;clear:left; height: 0; max-height: 0; line-height: 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear('left')
-    assert_equal '&lt;div style=&quot;clear:right; height: 10px; max-height: 10px; line-height: 10px;&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear(:right, 10)
-    assert_equal '&lt;div style=&quot;clear:both; height: 2.5em; max-height: 2.5em; line-height: 2.5em;&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear('2.5em')
-    assert_equal '&lt;div style=&quot;clear:both; height: 5px; max-height: 5px; line-height: 5px;&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear(5)
+    assert_equal '&lt;div style=&quot;clear: both; font-size: 0; height: 0; line-height: 0; max-height: 0&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear
+    assert_equal '&lt;div style=&quot;clear: left; font-size: 0; height: 0; line-height: 0; max-height: 0&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear(:left)
+    assert_equal '&lt;div style=&quot;clear: left; font-size: 0; height: 0; line-height: 0; max-height: 0&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear('left')
+    assert_equal '&lt;div style=&quot;clear: right; font-size: 10px; height: 10px; line-height: 10px; max-height: 10px&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear(:right, 10)
+    assert_equal '&lt;div style=&quot;clear: both; font-size: 2.5em; height: 2.5em; line-height: 2.5em; max-height: 2.5em&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear('2.5em')
+    assert_equal '&lt;div style=&quot;clear: both; font-size: 5px; height: 5px; line-height: 5px; max-height: 5px&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear(5)
+    assert_equal '&lt;div style=&quot;clear: both; font-size: 0; height: 0; line-height: 0; max-height: 0&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear(:clear =&gt; :both)
+    assert_equal '&lt;div style=&quot;clear: both; font-size: 0; height: 0; line-height: 0; max-height: 0&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear(:clear =&gt; :both)
+    assert_equal '&lt;div style=&quot;clear: both; font-size: 5px; height: 5px; line-height: 5px; max-height: 5px; width: 99%&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear(:clear =&gt; :both, :height =&gt; 5, :width =&gt; '99%')
+    assert_equal '&lt;div style=&quot;clear: both; font-size: 0; height: 0; line-height: 0; max-height: 0; width: 99%&quot;&gt;&amp;nbsp;&lt;/div&gt;', clear(:width =&gt; '99%')
   end
 end</diff>
      <filename>test/clear_helper_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>106d540db483593d06492fe44e1166059cbe130c</id>
    </parent>
  </parents>
  <author>
    <name>Philip Hallstrom</name>
    <email>philip@pjkh.com</email>
  </author>
  <url>http://github.com/phallstrom/clear_helper/commit/308943116f2e8b4d8704ede37f1882c8a258e00a</url>
  <id>308943116f2e8b4d8704ede37f1882c8a258e00a</id>
  <committed-date>2008-12-24T13:46:46-08:00</committed-date>
  <authored-date>2008-12-24T13:46:46-08:00</authored-date>
  <message>update clear helper to take an hash as an argument whose keys are stringified and turned into the style specific attributes</message>
  <tree>46660aed978a504a7ee73310d2de5bb4e669970e</tree>
  <committer>
    <name>Philip Hallstrom</name>
    <email>philip@pjkh.com</email>
  </committer>
</commit>
