Created
February 23, 2012 11:43
-
-
Save robinvdvleuten/1892505 to your computer and use it in GitHub Desktop.
Remove Drupal's core system stylesheets
This file contains hidden or 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 | |
/** | |
* Remove Drupal's core system stylesheets. | |
*/ | |
function THEMENAME_css_alter(&$css) | |
{ | |
$path_system = drupal_get_path('module', 'system'); | |
$remove = array( | |
$path_system . '/system.base.css', | |
$path_system . '/system.menus.css', | |
$path_system . '/system.messages.css', | |
$path_system . '/system.theme.css', | |
); | |
// Remove stylesheets which match our remove array. | |
foreach ($css as $stylesheet => $options) { | |
if (in_array($stylesheet, $remove)) { | |
unset($css[$stylesheet]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment