[EMAIL PROTECTED] wrote: > Does anyone else have an issue with Microsoft's conditional comments > solution? I really don't want to sound like I'm bashing here, I'm really > happy that we're getting a more compliant browser from IE, but I'm about to > embark on hours of work to fix up sites for which I or previous developers > employed the child selector to get around IE's deficiencies which still have > not been fixed. > > I must now decide between IE's conditional comments approach, or use the > triple-XXX hack. Neither of these appeal. My main concern with conditional > comments is that it pollutes my document with proprietary, bulky markup. I > employ filters to feed CSS to different versions of IE. If I followed > Microsoft's advice, I would instead have the following in the head of every > one of my pages: > > <!--[if IE 5.0]> > <link rel="stylesheet" type="text/css" href="ie-5.0.css" /> > <![endif]--> > <!--[if IE 5.5]> > <link rel="stylesheet" type="text/css" href="ie-5.5.css" /> > <![endif]--> > <!--[if IE 6]> > <link rel="stylesheet" type="text/css" href="ie-6.0.css" /> > <![endif]--> > <!--[if IE 7]> > <link rel="stylesheet" type="text/css" href="ie-7.0.css" /> > <![endif]--> > > What about future versions? .. > Wouldn't it be a more elegant solution to put conditional comments in the CSS > document itself? ... > Am I over-reacting to this? Does anyone else have an issue with this? >
Now that you've got that off your chest.... :-) Yes, I'm sure you can find a lot of sympathy here. The one thing you WON'T find is a CSS-only solution. As much as we would like, CSS doesn't handle conditionals, and won't any faster than those governmental agencies get to release 5. The approach I'm tempted to take is a single conditional statement for any IE version and all IE hacks in a single CSS file. If you have hacks for all those versions in a single "all browser" CSS file today, you know them well enough to carry over into a single file for IE without breaking them up into 4, 5, 6 files. Go with <!--[if lt IE 8]> and (1) hope they'll get it right in 8 (check's in the mail), or (2) lower your opportunity for global search and replace catastrophes. -- Bob Easton Accessibility Matters: http://access-matters.com ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
