Enqueue a css using negative conditional tags

The bug’s only 4 years old so you wouldn’t want to rush them would you?! A workaround is to leave out the wp_style_add_data() and use the 'style_loader_tag' filter:

add_filter( 'style_loader_tag', function ( $tag, $handle ) {
    if ( $handle  == 'purecss-all-not-ie' ) {
        $tag = "<!--[if gt IE 8]><!-->\n" . $tag . "<!--<![endif]-->\n";
    }
    return $tag;
}, 10, 2 );

Leave a Comment