I was doing some work on a site today, and I found me in a bit of a jam. I'd rather not spend a lot of time (as I have done so far) writing all kinds of code to get aroud Drupal's default styling.
I'd also rather not completely forego Drupal's CSS, because nice modules like admin menu depends on it. So what to do?
After digging a lot around in the docs (which are, sadly, a bit confusing on the subject), I did a <?php print var_dump($css); ?> in my template, and figured out that all I had to do was to put <?php unset($css['all']['module']); ?> in my template.php page.tpl.php and then add my own CSS files as such:
drupal_add_css(path_to_theme().'/reset-fonts-grids.css', 'theme', 'all');
Be careful with this, since most module-related CSS is put into $css['all']['module'], so if you need any of that, you'll have to unset the values of the $css['all']['module'] array one by one, or just add the CSS file again with drupal_add_css().
Good tip
I've been doing that myself, for the very same reason. Sometimes I'd rather style a website from the ground up, without Drupal's defaults below my own CSS. Having YUI's reset.css as your bottom layer is the perfect start of a beautiful relat.. err, theme.
Post new comment