Created
January 31, 2013 18:35
-
-
Save ahx/4685112 to your computer and use it in GitHub Desktop.
How to add conditional classes to your html tag using HAML. This adds a ie8/i9 class when using IE and nothing when using real browsers.
The whole backstory: http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
Yes, i will try Slim next time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!!! | |
/[if IE 8] <html class="ie-lt10 ie8" lang="de"> | |
/[if IE 9] <html class="lt-lt10 ie9" lang="de"> | |
:plain | |
<!--[if gt IE 9]><!--><html lang="de"><!--<![endif]--> | |
%head | |
%body | |
:plain | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment