The future of CSS hacking

In an article at the recently launched Vitamin, Dave Shea brings up the potential dangers of using CSS hacks. Stop Hacking, or be Stopped is Dave's first article for Vitamin, which looks like it will be a great resource for web designers, developers and entrepreneurs.

In the article Dave uses the upcoming release of IE7 to point out that relying on browser bugs to send different CSS to different browsers has always been risky, and that it is proving to be increasingly difficult to keep track of and test various hacks in specific versions of specific browsers. He ends the article by suggesting a few possible ways of dealing with browser discrepancies in the future.

As I have stated before, I have never felt very comfortable with using CSS hacks. Opening somebody else's CSS file to find hacks and filtering provided for just about every browser that can be targeted with CSS hacks is really scary. Some people seem to use hacking as their first course of action when they encounter rendering differences between browsers. I am quite the opposite: only if I can find no other way do I resort to hacking. Or maybe I shouldn't even call it hacking, since the only browser that tends to need different CSS rules is Internet Explorer, and most of the time I use conditional comments for that. Filtering is probably a better term.

Some would be surprised by how often you can manage without hacks.

Posted on May 19, 2006 in Quicklinks, Browsers, CSS