I am trying to accomplish the following. I need to use Drupal 6 as a project requirement, but I want to use it with my own HTML and CSS stylesheets for each node/view/panel etc.
The problem is, whatever the theme, I always found that Drupal applies to my HTML content both my CSS stylesheets and the CSS related to the theme chosen. I have also tried, without success, using the stylestripper module (installed in sites/all/modules). No matter what I do, additional CSS stylesheets are applied to my pages, completely destroying my layout.
What is the proper way to achieve this? Why stylestripper does not work at all? Is there a completely blank theme available? I have tried basic, mothership, zen etc, but I always see additional CSS stylesheets applied to my pages.
This is driving me crazy, Drupal was chosen by someone else for its flexibility. Thank you in advance.
I don't this will work but i think just remove the following line in your theme's page.tpl.php
and then drupal will not any of its own styles..
this may be work for you.
Nitz
Read more at drupal.org.
Update:
The proper place to put this function, is in the
template.php
file of your theme. Actually in your case you need to pass an array of css filenames which you want to exclude.The call to
drupal_add_css()
with no arguments passed, will provide$css
with an array of CSS files which are going to be attached to your theme. So this is the right time to get in!As you see, In the first
foreach
loop we simply seek the$css
array for filenames which are existed in the passed$exclude
array, for style deletion. And we do the same job in the second loop for style insertion. And at the end of this, we return a themed representation of all styles that should be attached to the theme making use ofdrupal_get_css()
function. (maybe nothing in your case)Well, Where to call this function? You can call this helper function in
_phptemplate_variables()
for D5 orYOUR_THEME_preprocess()
for D6. As we see this in action for D6 (untested):I'm sure you know how to exclude 'em all ;)
If you define CSS and/or JavaScript files in your theme's .info file using filenames that match the core files then you override them, and if your overrides don't exist then they're not included.
See the .info file for the Tao theme for an example