There are some issues with the &quot;conditional&quot; enqueue method above - it cannot handle negative conditions properly. Consider, for example, including a CSS for rounded corners if the browser is not IE. See this ticket: <a href="http://core.trac.wordpress.org/ticket/16118">http://core.trac.wordpress.org/ticket/16118</a>. There is a patch provided in this thread, but I haven&#39;t checked if the patch is a part of the core yet.<br>
<br>I believe you can use an alternative approach making use of the &quot;style_loader_tag&quot;:<br><br>// First add a filter to style_loader_tag:<br>add_filter(&#39;style_loader_tag&#39;, &#39;filter_rounded_corners_css&#39;, 10, 2);<br>
<br>// Define the filter function:<br>function filter_rounded_corners_css($css_html_tag, $handle) {<br>    // If the stylesheet handle is &quot;rounded&quot; only then this style will take effect<br>    if ($handle == &#39;rounded&#39;) {<br>
        return &quot;&lt;!--[if !IE]&gt;--&gt;&quot;.$css_html_tag.&quot;&lt;!--&lt;![endif]--&gt;\n&quot;;<br>    }<br>    return $css_html_tag;<br>}<br><br>// The handle is &quot;rounded&quot;, which causes the inclusion of the rounded-corners.css file.<br>
wp_register_style(&#39;rounded&#39;, get_template_directory_uri().&#39;/rounded-corners.css&#39;);<br><br>
<br>Sayontan.<br><br><div class="gmail_quote">On Thu, Apr 21, 2011 at 11:50 AM, Edward Caissie <span dir="ltr">&lt;<a href="mailto:edward.caissie@gmail.com">edward.caissie@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I agree with &quot;recommended&quot; for adding additional stylesheets via wp_enqueue_style() immediately and pushing it to required with 3.2; which seems will not be all that far off.<br><br>I would also think that example, or similar ones, should be linked to so authors have something to work from if/when they adapt this &quot;new&quot; method.<br>


<br><br>Cais.<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Thu, Apr 21, 2011 at 2:39 PM, Chip Bennett <span dir="ltr">&lt;<a href="mailto:chip@chipbennett.net" target="_blank">chip@chipbennett.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I agree - but we rarely take something from a non-suggestion to *required* in one step, unless a critical need exists.<div><br></div><div>The general path is to make something *recommended*, fit-test it for a while, and then bump it up to *required*.</div>



<div><br></div><div><font color="#888888">Chip</font><div><div></div><div><br><br><div class="gmail_quote">On Fri, Apr 22, 2011 at 1:27 PM, Justin Tadlock <span dir="ltr">&lt;<a href="mailto:justin@justintadlock.com" target="_blank">justin@justintadlock.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


  
    
  
  <div text="#000000" bgcolor="#ffffff">
    This should be the *required* way.  Additional stylesheets should
    always be added with wp_enqueue_style().  This is what I&#39;ve been
    putting in my reviews, even for conditional stylesheets.<div><div></div><div><br>
    <br>
    On 4/21/2011 1:22 PM, Chip Bennett wrote:
    </div></div><blockquote type="cite"><div><div></div><div>I just found this:
      <div><a href="http://iamzed.com/2010/01/07/using-wordpress-wp_enqueue_style-with-conditionals/" target="_blank">http://iamzed.com/2010/01/07/using-wordpress-wp_enqueue_style-with-conditionals/</a></div>
      <div><br>
      </div>
      <blockquote style="margin:0pt 0pt 0pt 40px;border:medium none;padding:0px">
        <div><span style="font-family:&#39;Courier New&#39;,Courier,monospace;font-size:medium;color:rgb(0, 0, 187)">wp_enqueue_style<span style="margin:0px;padding:0px;color:rgb(102, 204, 102)">(</span><br style="margin:0px;padding:0px">




               <span style="margin:0px;padding:0px;color:rgb(255, 0, 0)">&#39;ie7-style&#39;</span>, <br style="margin:0px;padding:0px">
               get_template_directory_uri<span style="margin:0px;padding:0px;color:rgb(102, 204, 102)">(</span><span style="margin:0px;padding:0px;color:rgb(102, 204, 102)">)</span> . <span style="margin:0px;padding:0px;color:rgb(255, 0, 0)">&#39;/ie7.css&#39;</span><br style="margin:0px;padding:0px">




            <span style="margin:0px;padding:0px;color:rgb(102, 204, 102)">)</span>;<br style="margin:0px;padding:0px">
            <a href="http://www.php.net/global" style="margin:0px;padding:0px;color:rgb(208, 11, 11)" target="_blank"><span style="margin:0px;padding:0px;color:rgb(0, 0, 102)">global</span></a> <span style="margin:0px;padding:0px">$wp_styles</span>;<br style="margin:0px;padding:0px">




            <span style="margin:0px;padding:0px">$wp_styles</span>-&gt;<span style="margin:0px;padding:0px">add_data</span><span style="margin:0px;padding:0px;color:rgb(102, 204, 102)">(</span> <span style="margin:0px;padding:0px;color:rgb(255, 0, 0)">&#39;ie7-style&#39;</span>, <span style="margin:0px;padding:0px;color:rgb(255, 0, 0)">&#39;conditional&#39;</span>, <span style="margin:0px;padding:0px;color:rgb(255, 0, 0)">&#39;lte
              IE 7′</span><span style="margin:0px;padding:0px;color:rgb(102, 204, 102)">)</span>;</span></div>
      </blockquote>
      <div><br>
      </div>
      <div>This might move into the Guidelines, as *Recommended*
        implementation of enqueueing IE-conditional stylesheets.
        Thoughts?</div>
      <div><br>
      </div>
      <div>Chip</div>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
theme-reviewers mailing list
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a>
</pre>
    </blockquote>
  </div>

<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Sayontan Sinha<br><a href="http://mynethome.net" target="_blank">http://mynethome.net</a> | <a href="http://mynethome.net/blog" target="_blank">http://mynethome.net/blog</a><br>
--<br>Beating Australia in Cricket is like killing a celebrity. The death gets more coverage than the crime.<br><br>