Sha256: 4c3dccccaa7347545c35e29cd6bf242b11b7f0a172b16e02cbc2a7f703f925d1
Contents?: true
Size: 798 Bytes
Versions: 25
Compression:
Stored size: 798 Bytes
Contents
module Speedo module LayoutHelper # Implements the Paul Irish IE conditional comments HTML tag--in HAML. # http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ def cc_html(options={}, &blk) attrs = options.map { |(k, v)| " #{h k}='#{h v}'" }.join('') [ "<!--[if lt IE 7 ]> <html#{attrs} class='ie6'> <![endif]-->", "<!--[if IE 7 ]> <html#{attrs} class='ie7'> <![endif]-->", "<!--[if IE 8 ]> <html#{attrs} class='ie8'> <![endif]-->", "<!--[if IE 9 ]> <html#{attrs} class='ie9'> <![endif]-->", "<!--[if (gt IE 9)|!(IE)]><!--> <html#{attrs}> <!--<![endif]-->", capture_haml(&blk).strip, "</html>" ].join("\n") end end end ActionView::Base.send :include, Speedo::LayoutHelper
Version data entries
25 entries across 25 versions & 1 rubygems