Skip to content

Instantly share code, notes, and snippets.

@ivandoric
Created June 9, 2014 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivandoric/0c8c0b7b0d6dc4a6f7a6 to your computer and use it in GitHub Desktop.
Save ivandoric/0c8c0b7b0d6dc4a6f7a6 to your computer and use it in GitHub Desktop.
drupal: remove system css files
<?php
/* Add this to themes template.php */
function THEME_NAME_css_alter(&$css)
{
unset($css[drupal_get_path('module', 'system').'/system.theme.css']);
unset($css[drupal_get_path('module','system').'/system.base.css']);
unset($css[drupal_get_path('module', 'system').'/system.messages.css']);
unset($css[drupal_get_path('module', 'comment').'/comment.css']);
unset($css[drupal_get_path('module', 'field').'/theme/field.css']);
unset($css[drupal_get_path('module', 'mollom').'/mollom.css']);
unset($css[drupal_get_path('module', 'node').'/node.css']);
unset($css[drupal_get_path('module', 'search').'/search.css']);
unset($css[drupal_get_path('module', 'user').'/user.css']);
unset($css[drupal_get_path('module', 'views').'/css/views.css']);
unset($css[drupal_get_path('module', 'ctools').'/css/ctools.css']);
unset($css[drupal_get_path('module', 'panels').'/css/panels.css']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment