Created
November 26, 2012 17:37
-
-
Save andrexduarte/4149564 to your computer and use it in GitHub Desktop.
Browser specific hacks
This file contains hidden or 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
/* -- IE 6 -- */ | |
* html .class { } | |
/* -- IE 7 -- */ | |
*+html .class{ } | |
/* -- IE 7 and modern browsers -- */ | |
html>body .class { } | |
/* -- Modern browsers (not IE 7) -- */ | |
html>/**/body .class { } | |
/* -- Opera 9.27 and below -- */ | |
html:first-child .class { } | |
/* -- Safari -- */ | |
html[xmlns*=""] body:last-child .class { } | |
/* Safari 3+, Chrome 1+, Opera 9+, Fx 3.5+ */ | |
body:nth-of-type(1) .yourclass { } | |
/* Safari 3+, Chrome 1+, Opera 9+, Fx 3.5+ */ | |
body:first-of-type .yourclass { } | |
/* Safari 3+, Chrome 1+ */ | |
@media screen and (-webkit-min-device-pixel-ratio:0) { | |
.yourclass { } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment