ie6 css fixer v0.6

It's been a while since we last updated our IE6 CSS Fixer tool, of course that doesn't mean we're completely neglecting it. v0.6 of the IE6 CSS Fixer brings us a couple of steps closer to a v1.0 release and adds a valuable css fix, while at the same time broadening the scope of the tool. More information follows below.

dead ends

These last couple of months we've been looking into minimizing unwanted effects resulting from the use of our tool. Sadly all our experiments have failed as we're lacking the html on which the css gets applied. This makes it impossible to find out what the range of css properties is for each element on a page. Our tool applies fixes based on each separate rule in a css file, but isn't aware of overriding or cascading. As for now this remains the biggest issue in our tool.

.error {background:url("");} .error.spec {display:inline;}

Currently we have one possible optimization, explained by the little code snippet above. Our tool will place a zoom:1 on the .error class if the background fix is applied. This poses a problem for elements set to display:inline, so for .error.spec we could set value of the zoom property back to 0. It's a very small fix which doesn't sound too effective as this is still not a 100% fail-proof solution. We're keeping this option open, but don't expect it to appear anytime soon.

new, new, new!

On to better news. The most notable addition to v0.6 is the option to fix transparency for ie6 (and 7 for that matter). The fix scans for the opacity rule in the css and replaces it with the IE filter statement. Mind that this doesn't work for transparent pngs, only for those rules where the opacity property is explicitly defined in the css. Also know that the IE filter fix doesn't work with scripting disabled in IE. These are the normal constraints of the fix, there's little our tool can change about that.

The second addition is an option to generate the fixes for IE7 (using the IE7 specific hack). Not all fixes might be necessary for IE7, but we noticed that by applying them to IE7 nothing breaks and stuff still gets fixed in the process. What we usually do is place the generated code in a css for IE7 and below (through conditional comments), only excluding the part about min-heights as this works in IE7 by default and the fix will actually break IE7 behavior. As the conditional comment solution is not always available (project constraints), we added the option to generate the fixes specifically for IE7 (without the min-height fix).

Finally some minor code changes were made, making the tool a tiny bit faster, though this is hardly noticeable. Still, faster is better.

future additions

We are still looking into adding an option that accepts a url to a live page which will filter all the css found in the html code (of that single page) and applies the fixes for the combined css. Sadly we encountered some issues, mostly related to password-protected sites (usually the case for development environments, which we assume will be a typical scenario for this particular option).

Besides that we'll be looking in the transparent png fix for ie6. This will probably be added in the near future, but will be marked as "dangerous" as it could destroy the layout in a fair number of cases. The fix breaks the background-positioning property (the image will always be positioned top left) and as it will be applied to all pngs found in the css this might very well have some negative effects on the layout. Still, we believe it will be useful, even if you have to remove some lines from the generated file, as the fix is quite messy and almost impossible to write from memory.

So that's it for now. If you want to test out v0.6 of the IE6 CSS Fixer tool, it's still at same location. Hope this helps!