Good CSS Hacks

Found an interesting article titled Avoiding CSS Hacks for Internet Explorer.

This article stems from some discussion over how CSS authors should handle CSS hacks so their layouts don’t break as future versions of browsers are released (such as IE7 which should be out soon).

Be sure to check out Tantek’s post. He lays down 3 rules on what CSS hacks should be. It’s really a nice and simple list to take to heart when developing CSS. I break all 3 rules all the time, but now I’ve got this list in the back of my head to help shape future work. Rule 3 I think is especially interesting in which he states that CSS hacks should be ugly. That the poor aesthetics of the CSS from the rest of your stylesheet make it obvious that it’s a hack and something you will want to revisit as times change with new browsers.

Now I hate ugly CSS. I’m a stickler for aesthetic. But I’m giving the idea some serious thought on future work.

Still.. I’m sure stuff I’ve done will break with IE 7. They’ll fix some stuff, but not all of it. So some hacks will break. Tantek covers this a bit and seems to say “screw it” to IE 7. That it’s Microsoft’s responsiblity for creating a solid CSS 2.1 implementation. If they don’t, it shouldn’t be our responsibility to work around another browser.

Thing is, we’ve been doing that for so long, I don’t know if that kind of stance will hold up.

We won’t know how things play out until IE7 goes to market. It should be a fun time.

Oh, and check out this little bit on the optimism tax. It’s a nice simplification of some deeper beliefs of my own (and probably others). Although I think it’s best said (and most simplified) with the old saying shit happens.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s