Christian Montoya

Why I avoid using conditional comments

I'm not making this post as an argument against conditional comments, but this is my personal reason for avoiding them. To be honest, I'm afraid of the possibility that someday, the <head> section will be filled with this:

<link rel="stylesheet" href="base-style.css" type="text/css" />

<!--[if IE]>
<link rel="stylesheet" href="ie-style.css" type="text/css" />
<[end if]-->

<!--[if FF]>
<link rel="stylesheet" href="ff-style.css" type="text/css" />
<[end if]-->

<!--[if Opera]>
<link rel="stylesheet" href="opera-style.css" type="text/css" />
<[end if]-->

<!--[if Safari]>
<link rel="stylesheet" href="safari-style.css" type="text/css" />
<[end if]-->

<!--[if Konquerer]>
<link rel="stylesheet" href="konquerer-style.css" type="text/css" />
<[end if]-->

<!--[if iCab]>
<link rel="stylesheet" href="icab-style.css" type="text/css" />
<[end if]-->

<!--[if Flock]>
<link rel="stylesheet" href="flock-style.css" type="text/css" />
<[end if]-->

Conditional comments are just against my idea of how CSS should be served… and that's all I have to say about that.

Thank you for reading • Published on February 2nd, 2007 • Please take a moment to share this with your friends