I'm using jquery tabs on my page but they loaded some default styles that I didn't want. Thus I removed them with the following code:
drupal_add_library('system', 'ui.tabs');
function mytheme_css_alter(&$css) {
// List of disabled drupal default css files.
$disabled_drupal_css = array(
// Remove jquery.ui css files.
'misc/ui/jquery.ui.core.css',
'misc/ui/jquery.ui.theme.css',
// 'misc/ui/jquery.ui.tabs.css',
);
// Remove drupal default css files.
foreach ($css as $key => $item) {
if (in_array($key, $disabled_drupal_css)) {
// Remove css and its altered version that can be added by jquery_update.
unset($css[$css[$key]['data']]);
unset($css[$key]);
}
}
}
This seems to do the trick, but I also noticed that my backend is not loading it's styles properly. I guess some of it uses the jquery.ui styles.
How can I load these only for the logged in user but not for