lib/css_builder.rb in css_builder-0.1.2 vs lib/css_builder.rb in css_builder-0.1.3

- old
+ new

@@ -7,12 +7,14 @@ def value! @css end def comment!(comment) - @css << "/* #{comment} */" + css! "/* #{comment} */" _newline + _newline + @css end def id!(*args, &block) _start_tag("##{args[0]}", *args[1..-1], &block) @css @@ -49,10 +51,11 @@ self.instance_eval(&block) _close _newline + _newline end def css!(val) @css << val end @@ -93,9 +96,12 @@ end end end def _args_hash_values(hash) + if hash.has_key?(:selector) + css! hash.delete(:selector) + end css! _dasherize hash.delete(:tag) if hash.has_key?(:tag) css! "##{hash.delete(:id)}" if hash.has_key?(:id) css! _class(hash.delete(:class)) if hash.has_key?(:class) hash.each do |k,v| css! ":#{_dasherize k}(#{v})"