ieblog: replace your old hacks with a new one!

No doubt you've seen this: IEBlog : Call to action: The demise of CSS hacks and broken pages. Microsoft is telling us to replace CSS hacks with a new, officially-sanctioned hack (yeah, the perfect solution). Instead of fixing the rendering engine in IE7, they're telling us to use conditional comments and write a separate stylesheet all for IE (because it's special).

It would be far better to just make the rendering engine work properly, so it obeyed the standard rules and ignored the hack rules... you know, just like standards-compliant browsers do. Then we'd just remove the IE6 hacks when IE6 became irrelevant in the marketplace.

But no, MS wants us to edit every single document we have (we have nothing better to do, you see); adding a comment that no other browser needs, to load an extra stylesheet that no other browser needs. A hack, in other words. Bloat, to boot.

If they were going to make up a new hack, couldn't they have at least put it in the CSS? That way we could just wrap the IE-only code in a conditional CSS comment in our existing stylesheet.

I guess it's not going to be a big deal for a lot of people. If you have a decent CMS you should be able to just move your already-written hacks into a new file, then update your templates to add the conditional comments. It is effective, I guess it just irritates me that it's required in the first place.

Some other reactions to the IEBlog post:

  • Eric's Archived Thoughts: IE7 and IE7 ... in short, Eric suggests we could use the IE7 script to make IE6 behave the same as IE7. He also reminds us that we still aren't dealing with the final release of IE7, so we still shouldn't get too emotionally involved.
  • mezzoblue ��� Bye Bye Tan Hack: 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. I wouldn't go so far as to say a 'good chance'. There's a chance, sure.
  • The Web Standards Project | IEBlog: Clean up your CSS hacks. The wasp crew simply suggest minimising hacks to better prepare for whatever really gets released.
  • Stop using CSS hacks now | 456 Berea Street. Plenty of interesting discussion.

See also: IE7: sane and rational?

Comments

about

Web development and standards, as seen by Ben Buchanan.