-
Notifications
You must be signed in to change notification settings - Fork 0
/
ie8-vs-ie9-a-ie8.html
71 lines (69 loc) · 2.83 KB
/
ie8-vs-ie9-a-ie8.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<meta http-equiv="X-UA-Compatible" content="ie=8" />
<title>Test IE8 vs. IE9-as-IE8</title>
<style type="text/css">
body {
color: black; background: white;
}
pre, code {
font-family: Menlo, "Deja Vu Sans Mono", "Bitstream Vera Sans Mono", Monaco, monospace;
}
.test {
height: 150px;
width: 150px;
border: 1px solid black;
-webkit-box-shadow: inset 1px 1px 0 #fff;
-moz-box-shadow: inset 1px 1px 0 #fff;
-ms-box-shadow: inset 1px 1px 0 #fff;
-o-box-shadow: inset 1px 1px 0 #fff;
box-shadow: inset 1px 1px 0 #fff;
background: rgba(50,200,50, 0.8) url(bg-loaded.png);
background-repeat: no-repeat;
}
.blah a:last-of-type {
display: none;
}
del {
text-decoration: line-through;
background: rgb(100%, 90%, 90%);
}
ins {
text-decoration: none;
background: rgb(90%, 100%, 90%);
}
</style>
</head>
<body>
<h1>Testing</h1>
<p><del>This page may look different in IE8 and IE9 in IE8 mode, even though theoretically they should be the same.</del></p>
<p><ins>This page documented a difference between IE9 beta's IE8 mode and IE8 that <strong>no longer applies to IE9 RC.</strong></ins></p>
<pre><code class="css">.test {
// (height, width, border) …
<b>background: rgba(50,200,50, 0.8) url(bg-loaded.png);</b>
}</code></pre>
<div class="test"> </div>
<p>If the above div has a green background (as opposed to none/white), your browser understands <code>rgba()</code> color notation;
if it reads “Background Loaded ✓” then the image defined in the same CSS declaration as the <code>rgba()</code> color
has been loaded.</p>
<h3>Results</h3>
<p>IE8 doesn’t give the box a background at all, as expected <ins>(this is now matched by IE9 RC’s IE8 mode)</ins>: <br />
<img src="8vs9-as-8/ie8_rendering.png" width="152" height="152" border="0" />
</p>
<p>IE9 (beta <ins>but not the newer <abbr title="Release Candidate">RC</abbr></ins>) renders the box background, EVEN in IE8 mode!: <br />
<img src="8vs9-as-8/IE9_in_IE8_mode_rendering.png" width="152" height="152" border="0" /><br />
<small>No seriously, IE8 mode: <br />
<img src="8vs9-as-8/IE9_in_IE8_mode_proof.png" alt="Browser mode: IE8. Document mode: IE8 standards" border="0" />
</small>
</p>
<p>Just for reference, here’s Webkit/Chrome 8 <ins>(IE9 RC “IE9 standards mode” is similar)</ins>: <br />
<img src="8vs9-as-8/Webkit_rendering.png" width="152" height="152" border="0" />
</p>
<h3>Conclusion</h3>
<p><del>IE8 ≠ IE9 in IE8 document and browser mode. So you can’t expect to only test for compatibility with IE8 by emulating it in IE8.</del></p>
<p><del>I strongly suspect IE9 is using the same CSS parsing — or at least color value parsing — in IE8 emulation mode.</del></p>
<p><ins>The discrepancy explored here has been fixed in IE9 RC.</ins></p>
</body>
</html>