Remove unwanted CSS from a library out of Drupal 7

Nov 8, 2012 08:18 · 40 words · 1 minute read drupal

Libraries that get implemented using the Libraries module sometime bring their own stylesheets which you might not want at all. Instead of overriding each selector you can unset the entire stylesheet as follows:

function mytheme_css_alter(&$css) { 
    unset($css[libraries_get_path('flexslider') . '/flexslider.css']); 
}