Adding conditional stylesheets via Drupal’s template.php

Nov 6, 2012 08:41 · 29 words · 1 minute read drupal

function mytheme_preprocess_html(&$variables) { // Add conditional stylesheets for IE drupal_add_css(path_to_theme() . ‘/css/ie-lte-8.css’, array(‘group’ => CSS_THEME, ‘browsers’ => array(‘IE’ => ‘lte IE 8’, ‘!IE’ => FALSE), ‘preprocess’ => FALSE)); }