Created
January 26, 2012 02:13
-
-
Save joshuapowell/1680496 to your computer and use it in GitHub Desktop.
Drupal: Remove as much pre-generated core CSS as possible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_css_alter(). | |
*/ | |
function MYTHEME_css_alter(&$css) { | |
// Remove core block stylesheet(s) | |
unset($css[drupal_get_path('module', 'block') . '/block.css']); | |
// Remove core date stylesheet(s) | |
unset($css[drupal_get_path('module', 'date') . '/date_api/date.css']); | |
// Remove core ctools stylesheet(s) | |
unset($css[drupal_get_path('module', 'ctools') . '/css/ctools.css']); | |
// Remove core fields stylesheet(s) | |
unset($css[drupal_get_path('module', 'field') . '/theme/field.css']); | |
// Remove core node stylesheet(s) | |
unset($css[drupal_get_path('module', 'node') . '/node.css']); | |
// Remove core system stylesheet(s) | |
unset($css[drupal_get_path('module', 'system') . '/admin.css']); | |
unset($css[drupal_get_path('module', 'system') . '/defaults.css']); | |
unset($css[drupal_get_path('module', 'system') . '/system.css']); | |
unset($css[drupal_get_path('module', 'system') . '/system.base.css']); | |
unset($css[drupal_get_path('module', 'system') . '/system.menus.css']); | |
unset($css[drupal_get_path('module', 'system') . '/system.messages.css']); | |
unset($css[drupal_get_path('module', 'system') . '/system.theme.css']); | |
// Remove core user stylesheet(s) | |
unset($css[drupal_get_path('module', 'user') . '/user.css']); | |
// Remove core views stylesheet(s) | |
unset($css[drupal_get_path('module', 'views') . '/css/views.css']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment