By ikeizer on
I'd like to stop all modules from inserting CSS, as well as any core CSS insertion. I know I can override CSS files, but instead I'd like to be able to actually STOP all css files from being inserted. Is this possible?
I'd like to stop all modules from inserting CSS, as well as any core CSS insertion. I know I can override CSS files, but instead I'd like to be able to actually STOP all css files from being inserted. Is this possible?
Comments
Just noticed this and I have
Just noticed this through the rss feed and have a quick answer for you to try.
http://drupal.org/project/stylestripper
Interesting will try it out!
Interesting will try it out!
Yes, remove print $styles
Yes, remove print $styles from page.tpl. It will remove every css files :)
On second thought, no, ignore that, you'd better go to your .info file. An explanation from zen_classic theme:
Duplicate any call to modules css there to remove them. Here is an example if you want to remove node.css:
This will remove node.css from inclusion. Add as many as unnecessary css files you want to remove. If they are placed inside a subdirectory of the module, include the subdirectory as well.
Please bear in mind, there are some important css to drupal, you must exclude them from removal, such as: defaults.css, system.css, color.css, farbtastic.css, or else copy over into your custom aggregated css file. Just be careful. Once you edit your .info file, you must clear the theme registry.
On the third thought, actually if all you worry about is http requests. Drupal has built-in aggregator for javascript and css. So you must visit admin/settings/performance to activate it.
love, light n laughter
Thanks Gausarts, I think I
Thanks Gausarts, I think I will actually go with just removing $styles, as otherwise I'll have to override every single CSS file. It's not the requests I'm worried about, its just ease of CSS editing as I prefer all style info to be in one single CSS instead of X different ones.