title: Browser-dependent CSS switch with JSF
body: <p>I need some browser specific CSS in my JSF2 application (Mojarra 2.1, Tomcat 7).</p>
  
  <p>I tried adding to my template:</p>
  
  <pre><code>    &lt;!--[if IE 8]&gt;
          &lt;link rel="stylesheet" type="text/css" href="#{cfgs.externalCssUrlIE8}" /&gt;
      &lt;![endif]--&gt;
  </code></pre>
  
  <p>but the comments are not rendered since I also use:</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;!-- Removes any comments from the rendered HTML pages. --&gt;
      &lt;param-name&gt;javax.faces.FACELETS_SKIP_COMMENTS&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
  &lt;/context-param&gt;
  </code></pre>
  
  <p>my problem... when I disable `javax.faces.FACELETS_SKIP_COMMENTS, I get a bunch of other problems.. Also I don't think my source-code comments belong to the generated pages.</p>
  
  <p>I also tried to put the switch in CDATA like:</p>
  
  <pre><code>&lt;![CDATA[
   &lt;!--[if IE 7]&gt;
          &lt;link rel="stylesheet" type="text/css" href="#{cfgs.externalCssUrlIE7}" /&gt;
   &lt;![endif]--&gt;
  ]]&gt;
  </code></pre>
  
  <p>but the inner &lt; are rendered as html entities.. :-/, so its not working.</p>
  
  <p>Question: Is there any other solution? Does any JSF2 tag exist to handle this? External tag libraries? </p>
  
  <p>Thanks in advance,
  Steve</p>