Tiffany B. Brown

A web log about web development and internet culture with frequent detours into other stuff.
New York City: Future of Web Design
Links for 2007-06-30

Open thread: Conditional comments: Yay or Nay?

I’m a big fan of conditional comments. I agree with Jens Meiert that they are non-standard, and don’t adequately separate content and presentation. However, I think they’re the best option we’ve got for one huge reason: it is the only reliable workaround for Internet Explorer that does not also affect other browsers.

The LitePacific hack for example, works well in Internet Explorer 6 and 7, but also affects Safari. If you support Safari, you will also need to create a separate set of style sheet hacks to address differences in the way Safari and IE render pages.

CSS hacks also make your style sheets much harder to read. With conditional comments, you have to maintain multiple style sheets, but each style sheet is cleaner and clearer. Granted, with each new version of Internet Explorer, you have to update your header templates. But updating a header file offers far less risk than integrating new hacks into your style sheets.

Which necessary evil do you prefer? CSS hacks or conditional comments? Speak your piece in the comments.

Share this entry:
  • TwitThis
  • Digg
  • Technorati
  • del.icio.us
  • Ma.gnolia
  • Mixx
  • NewsVine
  • Reddit
  • StumbleUpon
  • TailRank
  • Furl
  • Slashdot
  • Global Grind
  • YahooMyWeb
  • Facebook
  • Google
  • Live
  • LinkedIn
  • MySpace
previous post: New York City: Future of Web Design
next post: Links for 2007-06-30