Skip to content

Instantly share code, notes, and snippets.

@jayfallon
Forked from nex3/helper.rb
Created November 17, 2010 16:29
Show Gist options
  • Save jayfallon/703601 to your computer and use it in GitHub Desktop.
Save jayfallon/703601 to your computer and use it in GitHub Desktop.
def conditional_body
haml_concat "<!--[if !IE]>--><body><!--<![endif]-->"
haml_concat "<!--[if IE 6]><body class='ie ie6'><![endif]-->"
haml_concat "<!--[if IE 7]><body class='ie ie7'><![endif]-->"
haml_concat "<!--[if IE 8]><body class='ie ie8'><![endif]-->"
tab_up
yield
tab_down
haml_concat "</body>"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment