how to delete all the css from Drupal and add my css.

oskar_calvo - July 3, 2009 - 22:45

Hello, i want to unset the $styles var, and add my own css style.
I'm trying this in template.php into the mytheme_page_preprocess function

<?php

function basic_preprocess_page(&$vars, $hook) {
unset (
$vars['styles']);
$vars['styles'] = $var['styles'] = drupal_add_css(path_to_theme() .'/css/file.css', 'theme');
}

?>

But I get nothing.

Thanks

Oskar

..but why u want to delete

mm167 - July 4, 2009 - 00:46

..but why u want to delete the css in php?

why not remove the css from drupal folder?
or disable them by login as administer?

We go the drupal way. How about you?
http://www.drupalway.com

Hello mm167. I'm working in a

oskar_calvo - July 4, 2009 - 07:49

Hello mm167.

I'm working in a theme to blackberry and iphone. after checking how those stuff works, my idea is:
Delete all the css,
build a theme for blackberry
build a theme for iphone.

I cannot delete the css from the folders because some people will see the intranet with computer, but other with those stuffs.

Thanks.

Oskar

You can override any core or

RWWood - July 5, 2009 - 00:31

You can override any core or module stylesheet by copying it to your theme folder and then adding it into your .info file like:

stylesheets[all][] = css/book.css

Then you make the changes you want in the copy that's in your theme directory. If you don't want any of the styles in a particular .css file, follow the above, but leave the style sheet blank, ie. an empty .css file.

Check out http://drupal.org/node/171209

Hope that helps.

 
 

Drupal is a registered trademark of Dries Buytaert.