0

How can I unset css files in Drupal 6 ?

i.e. I want to unset default.css system.css and system-menu.css

thanks

aneuryzm
  • 63,052
  • 100
  • 273
  • 488
  • 1
    possible duplicate of [How to get rid of Drupal CSS stylesheets?](http://stackoverflow.com/questions/2340426/how-to-get-rid-of-drupal-css-stylesheets) – Henrik Opel Sep 27 '10 at 10:02
  • 1
    The accepted answer in that 'possible duplicate', along with the contained link should provide all the information you need. – Henrik Opel Sep 27 '10 at 10:05

2 Answers2

1

The Stylestripper module lets you selectively deactivate stylesheets from Drupal core.

Scott Reynen
  • 3,530
  • 18
  • 17
0

Add this to your template.php file:


function yourtheme_preprocess_page(&$vars){
  $css = drupal_add_css();
  unset($css['all']['module']['modules/system/system.css']);
  unset($css['all']['module']['modules/system/defaults.css']);
  unset($css['all']['module']['modules/system/system-menus.css']);
  unset($css['all']['module']['modules/node/node.css']);
  unset($css['all']['module']['modules/user/user.css']);
  $vars['styles'] = drupal_get_css($css);
}

See the drupal_add_css function.

angryobject
  • 418
  • 2
  • 7