Code

branche website
[rrdtool-all.git] / website / inc / IE7 / ie7-squish.js
1 /*\r
2         IE7, version 0.9 (alpha) (2005-08-19)\r
3         Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)\r
4         License: http://creativecommons.org/licenses/LGPL/2.1/\r
5 */\r
6 IE7.addModule("ie7-squish", function() {\r
7 \r
8 /* ---------------------------------------------------------------------\r
9 \r
10   Squish some IE bugs!\r
11 \r
12   Some of these bug fixes may have adverse effects so they are\r
13   not included in the standard library. Add your own if you want.\r
14 \r
15   -dean\r
16 \r
17 --------------------------------------------------------------------- */\r
18 \r
19 // @NOTE: ie7Layout.boxSizing is the same as the "Holly Hack"\r
20 \r
21 // "doubled margin" bug\r
22 // http://www.positioniseverything.net/explorer/doubled-margin.html\r
23 ie7CSS.addFix(/float\s*:\s*(left|right)/, "display:inline;$1");\r
24 \r
25 if (ie7Layout) {\r
26         // "peekaboo" bug\r
27         // http://www.positioniseverything.net/explorer/peekaboo.html\r
28         if (appVersion >= 6) ie7CSS.addRecalc("float", "left|right", function($element) {\r
29                 ie7Layout.boxSizing($element.parentElement);\r
30                 // "doubled margin" bug\r
31                 $element.runtimeStyle.display = "inline";\r
32         });\r
33 \r
34         // "unscrollable content" bug\r
35         // http://www.positioniseverything.net/explorer/unscrollable.html\r
36         ie7CSS.addRecalc("position", "absolute|fixed", function($element) {\r
37                 if ($element.offsetParent && $element.offsetParent.currentStyle.position == "relative")\r
38                         ie7Layout.boxSizing($element.offsetParent);\r
39         });\r
40 }\r
41 \r
42 //# // get rid of Microsoft's pesky image toolbar\r
43 //# if (!complete) document.write('<meta http-equiv="imagetoolbar" content="no">');\r
44 \r
45 });\r