-
-
Save globerunnerseo/2975107 to your computer and use it in GitHub Desktop.
Conditional classes test cases: DRYer and Compat View icon is not displayed in IE8/9. If X-UA-Compatible header is set using a server config then ie-cc-serverconfig.html is all that is needed.
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
<!DOCTYPE html> | |
<html lang="en" | |
xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:og="http://ogp.me/ns" | |
xmlns:fb="http://www.facebook.com/2008/fbml"> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta charset="utf-8"> | |
<!--[if lt IE 7]><html class="no-js ie6"><![endif]--> | |
<!--[if IE 7]><html class="no-js ie7"><![endif]--> | |
<!--[if IE 8]><html class="no-js ie8"><![endif]--> | |
<!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]--> | |
<title>Document</title> | |
<style> | |
body {background:green;} | |
.ie6 body {background:red;} | |
.ie7 body {background:orange;} | |
.ie8 body {background:yellow;} | |
</style> | |
</head> | |
<body> | |
</body> | |
</html> |
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
<!--[if IE]><![endif]--> | |
<!DOCTYPE html> | |
<!--[if lt IE 7]><html class="no-js ie6" lang="en"><![endif]--> | |
<!--[if IE 7]><html class="no-js ie7" lang="en"><![endif]--> | |
<!--[if IE 8]><html class="no-js ie8" lang="en"><![endif]--> | |
<!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]--> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta charset="utf-8"> | |
<title>Document</title> | |
<style> | |
body {background:green;} | |
.ie6 body {background:red;} | |
.ie7 body {background:orange;} | |
.ie8 body {background:yellow;} | |
</style> | |
</head> | |
<body> | |
<!-- | |
by @julienw : https://github.com/paulirish/html5-boilerplate/issues/378#issuecomment-1203093 | |
IE drops into Quirks Mode if the X-UA-Compatible header isn't set. | |
Less DRY but no duplication of <html> tag in source | |
--> | |
</body> | |
</html> |
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
<!DOCTYPE html> | |
<html lang="en" | |
xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:og="http://ogp.me/ns" | |
xmlns:fb="http://www.facebook.com/2008/fbml"> | |
<!--[if lt IE 7]><html class="no-js ie6"><![endif]--> | |
<!--[if IE 7]><html class="no-js ie7"><![endif]--> | |
<!--[if IE 8]><html class="no-js ie8"><![endif]--> | |
<!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<title>Document</title> | |
<style> | |
body {background:green;} | |
.ie6 body {background:red;} | |
.ie7 body {background:orange;} | |
.ie8 body {background:yellow;} | |
</style> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment