Для D7 вы можете использовать hook_css_alter
С http://drupalcode.org/project/tao.git/blob/HEAD:/template.php
<?php
/**
* Implements hook_css_alter().
* @TODO: Once http://drupal.org/node/901062 is resolved, determine whether
* this can be implemented in the .info file instead.
*
* Omitted:
* - color.css
* - contextual.css
* - dashboard.css
* - field_ui.css
* - image.css
* - locale.css
* - shortcut.css
* - simpletest.css
* - toolbar.css
*/
function tao_css_alter(&$css) {
$exclude = array(
'misc/vertical-tabs.css' => FALSE,
'modules/aggregator/aggregator.css' => FALSE,
'modules/block/block.css' => FALSE,
'modules/book/book.css' => FALSE,
'modules/comment/comment.css' => FALSE,
'modules/dblog/dblog.css' => FALSE,
'modules/file/file.css' => FALSE,
'modules/filter/filter.css' => FALSE,
'modules/forum/forum.css' => FALSE,
'modules/help/help.css' => FALSE,
'modules/menu/menu.css' => FALSE,
'modules/node/node.css' => FALSE,
'modules/openid/openid.css' => FALSE,
'modules/poll/poll.css' => FALSE,
'modules/profile/profile.css' => FALSE,
'modules/search/search.css' => FALSE,
'modules/statistics/statistics.css' => FALSE,
'modules/syslog/syslog.css' => FALSE,
'modules/system/admin.css' => FALSE,
'modules/system/maintenance.css' => FALSE,
'modules/system/system.css' => FALSE,
'modules/system/system.admin.css' => FALSE,
'modules/system/system.base.css' => FALSE,
'modules/system/system.maintenance.css' => FALSE,
'modules/system/system.menus.css' => FALSE,
'modules/system/system.theme.css' => FALSE,
'modules/taxonomy/taxonomy.css' => FALSE,
'modules/tracker/tracker.css' => FALSE,
'modules/update/update.css' => FALSE,
'modules/user/user.css' => FALSE,
);
$css = array_diff_key($css, $exclude);
}
Вы также можете перезаписать в теме .info для D6 и теперь D7 https://drupal.org/node/901062.
В некоторых темах был разработан некоторый помощник, использующий .info с ключами cssexclude и hook_css_alter
<?php
function twitter_bootstrap_css_alter(&$css) {
//global $theme_key;
//$theme_path = drupal_get_path('theme', $theme_key);
$excludes = _twitter_bootstrap_alter(twitter_bootstrap_theme_get_info('exclude'), 'css');
$css = array_diff_key($css, $excludes);
}
function twitter_bootstrap_js_alter(&$js) {
$excludes = _twitter_bootstrap_alter(twitter_bootstrap_theme_get_info('exclude'), 'js');
$js = array_diff_key($js, $excludes);
}
function _twitter_bootstrap_alter($files, $type) {
$output = array();
foreach($files as $key => $value) {
if(isset($files[$key][$type])) {
foreach($files[$key][$type] as $file => $name) {
$output[$name] = FALSE;
}
}
}
return $output;
}
Влияние на производительность низкое, поскольку hook_css_atler не часто запускается.