public
Last active

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11
def browser_scoped_container(el='body', options={}, &block)
namespace = 'browser_'
html = "<!--[if lt IE 7 ]><#{el} #{tag_options(options.merge(:class => "#{namespace}ie6"))}><![endif]-->"
html += "<!--[if IE 7 ]><#{el} #{tag_options(options.merge(:class => "#{namespace}ie7"))}><![endif]-->"
html += "<!--[if IE 8 ]><#{el} #{tag_options(options.merge(:class => "#{namespace}ie8"))}><![endif]-->"
html += "<!--[if (gt IE 9)|!(IE)]><!--><#{el} #{tag_options(options.merge(:class => "#{namespace}non_ie"))}><!--<![endif]-->"
html += capture(&block)
html += "</#{el}>"
 
html
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.