I’ve been using the Tan Hack for ages, otherwise known as
* html, since it’s proven a simple and effective mechanism for combatting some of the worst rendering bugs in IE. With only a few similar alternate ways of doing the same thing available, for the past few years it has been pretty much a choice of personal preference whether you’d go with Tan or conditional comments or
html > body.
At the same time, I suppose I had figured/hoped that by the time IE7 rolled around, enough sites will have implemented it that the IE team couldn’t simply break the relatively trivial hack without first fixing the much less trivial bugs it was working around.
However, it’s been clear for some time that
* html was going to be fixed. And now today, via WaSP, comes news that IE7 is going to be fixing a whole lot of other hacks. Wording on the IE Blog (“how easy it is to fall into the CSS hack trap”) seems to indicate that IE developers are against hacks in general, so it’s probably reasonable to assume that they’ll be looking to fix any others in the forthcoming releases.
Of course this was irritating at first. My initial reaction is to wonder why they’re throwing out the medicine without first curing the ailment. Full CSS2 support in IE7 is still a long way off.
But it’s probably not as bad as all that. I ranted a few months ago about IE7 beta 1, and since that time the IE team has announced that IE7 beta 2 will see a pile of new fixes. A lot of the things we still need to work around in IE6 may potentially be fixed in IE7. It’s anyone’s guess as to whether the list of fixes on the IE Blog is final, but I’d be willing to wager we’ll see even more updates by the time IE7 final is released. There’s a good chance that in some cases, you won’t have to change a line of code; the float bug your hack was fixing is no longer broken, so IE7 will simply render the initial rule properly, and not parse whatever corrective rules the hack piles on. IE6 will still behave as expected, and IE7 will treat the code as any other CSS-friendly browser. Hopefully. Maybe. In some cases.
So, all those existing sites out there we’ve built that don’t use conditional comments? Wait and see. IE7 beta 2 should be out in the next few months, we’ll know more then.
In the comments, “Agent Bishop” rightly points out that conditional comments do not work when you’re running multiple versions of Internet Explorer on a single PC. As always, Position is Everything has you covered. (Is there anything they can’t do?)
Still, it’s a pretty contorted process, and I don’t think it’s reasonable to expect web developers to hack their registry just to test web sites. I’d like to see an officially-sanctioned way of making conditional comments work with multiple versions of Internet Explorer. IE Team, how about it?
Eric Meyer points out that Dean Edwards’ IE7 script could very well give us an easy way out of any transition headaches.