CSS Hacks in IE7 | February 4, 2006
The closer Internet Explorer 7 gets to an official launch, the more concerned the IE dev team seem to be about the effect of CSS hacks. It started simply enough, with a few passing remarks that certain CSS bugs had been fixed and therefor hacks that use those bugs wouldn’t work on IE7. As things have progressed, these remarks started to sound a little more worried while the last few remarks actually sound seriously concerned.
I have to admit I can understand this concern up to a point, as nobody really knows what is going to happen. However I imagine the IE Dev team have been doing their research and have come across a number of broken sites. This is why they have asked developers to stop ditch CSS hacks and start using IE conditional comments instead.
The thing is, I really don’t understand the level of concern here. Maybe I’m missing something, but the majority of CSS hacks are used to send specific rules to Internet Explorer to make up for a deficiency in its CSS implementation. The IE dev team have fixed the majority of these deficiencies, so who cares if the hack no longer works? In fact it’s actually a good thing and I’d be more concerned if the hack still worked.
Take the humble Star HTML hack for instance. This hack is commonly used to supply rules only to Internet Explorer and not to any other browser. You would normally use this as part of the modified simplified box model hack to deal with IE5.x’s proprietary box model. The box model was fixed in IE6 as well as IE7, so what’s the big deal?
Similarly, I may sometimes use an underscore hack or child selector hack to compensate for Internet Explorers lack of PNG alpha transparency support or support for fixed positioning. With both of these CSS features suposidly fixed, where’s the problem?
It seems to me that their may be two issues at play here. First it appears that the IE team believes that CSS developers actively want some kind of filtering mechanism so they can filter out certain browsers. Personally I’ve never wanted to filter out a particular browser, just a particular broken browser version.
More importantly, I think the IE dev team are catering to a group of developers who build their sites with IE, rather than the standards in mind. If you build your sites expecting to use Internet Explorer 5.x’s proprietary box model and faulty overflow handling, of course your site will break on IE7. However it will also break on Firefox, Safari and any other half descent browser around. The problem isn’t the hacks themselves, it’s the way some developers have been using them. At least that’s my theory anyway.
Admittedly I’ve not actually tested IE7 yet, so this is pure conjecture. However if you’ve been using IE7, what’s your feeling? Are many websites seriously breaking due to CSS hacks, or are the IE dev team just being overly cautious?
Posted at February 4, 2006 11:20 AM