Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Like we've drupal_add_css() , there should be something like drupal_remove_css. An alternative way to module / theme developer to speed up by removing unnecessary css/js.
To Remove extra css code such as,
@import "/modules/node/node.css";
@import "/modules/system/defaults.css";
@import "/modules/system/system.css";
@import "/modules/user/user.css";
@import "/sites/all/modules/cck/content.css";
@import "/sites/all/modules/cck/fieldgroup.css";
@import "/themes/garland/style.css";
I'm not in favor that every custom developer should remove, but one should have option to remove it.
Comments
Comment #1
marc.groth CreditAttribution: marc.groth commentedAgreed!
Comment #2
sun.core CreditAttribution: sun.core commentedComment #3
jhedstromWe have
hook_css_alter()
for just this reason.