I think that excluding core modules css file ( user, node, search, menu, file ...) can make the theme more consistent, clear and clean , It can be done useing _css_alter() or in .info file.

The Tao theme uses this method.

code from Tao:

 $exclude = array(
    'misc/vertical-tabs.css' => FALSE,
    'modules/aggregator/aggregator.css' => FALSE,
    'modules/block/block.css' => FALSE,
    'modules/book/book.css' => FALSE,
    'modules/comment/comment.css' => FALSE,
    'modules/dblog/dblog.css' => FALSE,
    'modules/file/file.css' => FALSE,
    'modules/filter/filter.css' => FALSE,
    'modules/forum/forum.css' => FALSE,
    'modules/help/help.css' => FALSE,
    'modules/menu/menu.css' => FALSE,
    'modules/node/node.css' => FALSE,
    'modules/openid/openid.css' => FALSE,
    'modules/poll/poll.css' => FALSE,
    'modules/profile/profile.css' => FALSE,
    'modules/search/search.css' => FALSE,
    'modules/statistics/statistics.css' => FALSE,
    'modules/syslog/syslog.css' => FALSE,
    'modules/system/admin.css' => FALSE,
    'modules/system/maintenance.css' => FALSE,
    'modules/system/system.css' => FALSE,
    'modules/system/system.admin.css' => FALSE,
    'modules/system/system.base.css' => FALSE,
    'modules/system/system.maintenance.css' => FALSE,
    'modules/system/system.menus.css' => FALSE,
    'modules/system/system.messages.css' => FALSE,
    'modules/system/system.theme.css' => FALSE,
    'modules/taxonomy/taxonomy.css' => FALSE,
    'modules/tracker/tracker.css' => FALSE,
    'modules/update/update.css' => FALSE,
    'modules/user/user.css' => FALSE,
	
  );
  $css = array_diff_key($css, $exclude);

(rtl theme files are not listed)

Also a section in theme settting can list all css files from theme, core modules and contr. modules and let user to select which themes to exclud.

Comments

himerus’s picture

Assigned: Unassigned » himerus

I did have this function replicated in an earlier commit of this branch, and will plan to implement it again.

It would be great to make each of these CSS files a selection.
I'll have to investigate how to render ALL the stylesheets (core & contrib) in a list to exclude.
The core is easy enough to just make the list like in the Tao example. Not sure though on any additional contrib modules though.

Consider it marked as will implement.

himerus’s picture

I'm debating on this one... if this should be on the THEME layer... or in the module layer...

http://drupal.org/project/stylestripper has only a D6 version, but I've seen this in a presentation (Paris I think) from morten, and it looks like the exact solution...

I may contact the maintainer to discuss co-maintaining a D7 version... I'd like to use this too..

abbasmousavi’s picture

Ok, this is a good idea. I am ready to help porting stylestripper to D7.

himerus’s picture

Status: Active » Closed (works as designed)

Going to mark this as closed... I REALLY want to jump over and help further that stylestripper module... but am very short on time at the moment to work on a port...

Marking though as closed and the functionality IN Omega works as designed.

himerus’s picture

Assigned: himerus » Unassigned