X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fextensions%2Fmsie_compat%2Fjavascript%2Fie7-squish.js;fp=www%2Fextensions%2Fmsie_compat%2Fjavascript%2Fie7-squish.js;h=b44825cb82177639ff26f1de69be41a0d256c926;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c diff --git a/www/extensions/msie_compat/javascript/ie7-squish.js b/www/extensions/msie_compat/javascript/ie7-squish.js new file mode 100644 index 0000000..b44825c --- /dev/null +++ b/www/extensions/msie_compat/javascript/ie7-squish.js @@ -0,0 +1,36 @@ + +/* --------------------------------------------------------------------- + + Squish some IE bugs! + + Some of these bug fixes may have adverse effects so they are + not included in the standard library. Add your own if you want. + +--------------------------------------------------------------------- */ + +// @NOTE: ie7Layout.boxSizing is the same as the "Holly Hack" + +if (IE7.loaded && IE7.appVersion < 7) { + + // "doubled margin" bug + // http://www.positioniseverything.net/explorer/doubled-margin.html + IE7.CSS.addFix(/(float\s*:\s*(left|right))/, "display:inline;$1"); + + // "peekaboo" bug + // http://www.positioniseverything.net/explorer/peekaboo.html + if (IE7.appVersion >= 6) IE7.CSS.addRecalc("float", "(left|right)", function(element) { + IE7.Layout.boxSizing(element.parentElement); + // "doubled margin" bug + element.style.display = "inline"; + }); + + // "unscrollable content" bug + // http://www.positioniseverything.net/explorer/unscrollable.html + IE7.CSS.addRecalc("position", "absolute|fixed", function(element) { + if (element.offsetParent && element.offsetParent.currentStyle.position === "relative") + IE7.Layout.boxSizing(element.offsetParent); + }); +} + +//# // get rid of Microsoft's pesky image toolbar +//# document.write('');