When you create a theme from scratch, all the standard classess in css files from the core are overwritten by your files. So why not throw them all?
In template.php:
Get raw version
php
/** * Implements hook_css_alter(); */ function MY_THEME_css_alter(&$css) { $remove = array( 'misc/vertical-tabs.css', 'misc/vertical-tabs-rtl.css', 'misc/ui/jquery.ui.core.css', 'misc/ui/jquery.ui.theme.css', 'modules/comment/comment.css', 'modules/comment/comment-rtl.css', 'modules/field/theme/field.css', 'modules/field/theme/field-rtl.css', 'modules/file/file.css', 'modules/filter/filter.css', 'modules/node/node.css', 'modules/search/search.css', 'modules/search/search-rtl.css', 'modules/system/system.admin.css', 'modules/system/system.admin-rtl.css', 'modules/system/system.base.css', 'modules/system/system.base-rtl.css', 'modules/system/system.maintenance.css', 'modules/system/system.menus.css', 'modules/system/system.menus-rtl.css', 'modules/system/system.messages.css', 'modules/system/system.messages-rtl.css', 'modules/system/system.theme.css', 'modules/system/system.theme-rtl.css', 'modules/user/user.css', 'modules/user/user-rtl.css', 'sites/all/modules/ctools/css/ctools.css', ); foreach ($remove as $value) { unset($css[$value]); } }
Note that as you will need to use additional modules, like the toolbar or admin menu, you have to include a few additional classes from the core to your css file:
Get raw version
css
.element-invisible { clip: rect(1px, 1px, 1px, 1px); position: absolute !important; } .element-invisible.element-focusable:active, .element-invisible.element-focusable:focus { clip: auto; position: static !important; } .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
Comments
o-ar commented 5 years 2 months ago
very usefull
malcolm commented 5 years 2 months ago
Thanks, I hope will be useful:). This is the first step in all my custom themes ;)
michaelmol commented 5 years 2 weeks ago
Removing core css files can also achieved by the CSS FOAD method (source: http://drupal.org/node/1536790)
In your themename.info:
The files doesn't have to exsist in your theme.
malcolm commented 4 years 11 months ago
Thanks for nice addition :)
Anthon (not verified) commented 3 years 7 months ago
@michaelmol Thanks!