[theme-reviewers] enqueue conditional CSS?

Sayontan Sinha sayontan at gmail.com
Wed May 16 15:18:31 UTC 2012


Actually you can use wp_enqueue_style for this, by combining with the
style_loader_tag filter. E.g.:

add_filter('style_loader_tag', 'suffusion_filter_rounded_corners_css', 10,
2);
function suffusion_filter_rounded_corners_css($css_html_tag, $handle) {
    if ($handle == 'suffusion-rounded') {
        return "<!--[if !IE]>-->".$css_html_tag."<!--<![endif]-->\n<!--[if
gt IE 8]>".$css_html_tag."<![endif]-->\n";
    }
    return $css_html_tag;
}


On Wed, May 16, 2012 at 8:14 AM, .: chris :. <chris at jazzsequence.com> wrote:

> Why not use conditional classes instead of conditional stylesheets?
>
> http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
>
> :: code bandit ::
> http://protocol.by/jazzsequence
> http://about.me/jazzs3quence
>
> On May 16, 2012, at 9:11 AM, Shinra Web Holdings wrote:
>
> Are themes still permitted to load browser-conditional style sheets using
> <!--[if IE 7]><link rel="stylesheet" href="ie7.css" type="text/css"
> media="screen" /><![endif]--> or are they required to discover the browser
> using PHP and use wp_enqueue_style() ?
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>


-- 
Sayontan Sinha
http://mynethome.net | http://mynethome.net/blog
--
Beating Australia in Cricket is like killing a celebrity. The death gets
more coverage than the crime.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120516/37d4adca/attachment.htm>


More information about the theme-reviewers mailing list