Postponed (maintainer needs more info)
Project:
Drupal core
Version:
main
Component:
theme system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2013 at 12:27 UTC
Updated:
3 Nov 2025 at 19:11 UTC
Jump to comment: Most recent
Comments
Comment #1
joelpittetComment #2
joelpittetComment #3
star-szrPostponing, this is a nice-to-have and could go into a future minor version of 8.x.x.
Comment #4
star-szrJust want to mention the fact that we are using libraries everywhere negates the need for this a bit in my opinion. Because libraries can contain a whole handful of CSS files that can be removed en masse.
Comment #5
luksakI agree that this is a feature request we could postpone. But the fact that the system module adds 40 CSS files, this would be quite annoying to have that in 8.1.x because these 40 lines of code will end up in every single project I create. Can we rethink this? It would be nice to be able to to this:
Comment #6
luksakSetting this back to active.
Comment #7
star-szrI think if we add this it should be to libraries-override, not stylesheets-remove. stylesheets-remove is deprecated now.
Comment #8
Jeff Burnz commentedAgree with #7 of course this is the right approach, however we need this to happen because right now this is a huge PITA and the only way is stylesheets-remove or some trickery in hook_css_alter().
Comment #9
luksakTo be precise this would happen in hook_library_info_alter(). Which is a clean solution. But we should introduce this functionality to the .libraries.yml as well.
Do we have to change the issue title and summary in this case?
Comment #10
star-szrJust to emphasize my point in #7, this is how you would in 8.0.x remove all CSS added by the system module (everything in system.libraries.yml):
mytheme.info.yml:
8 lines of code in an .info.yml file isn't so bad IMO. I'd like to know more about the use case for the wildcard approach because to me it could be much less predictable than library-based removal.
Edit: If you look at system.libraries.yml actually a bunch of those libraries are just JS, but the point still stands.
Comment #11
luksakWell my suggestion was kind of outdated I guess...
Ok, but stylesheet-remove does a quite different thing. In most cases I don't want to remove all JS the system module adds but all of it's CSS.
Besides that if you are using classy you can double this 8 lines yo will have to add all of those as well:
I guess this will get a lot worse installing contrib modules.
Is there a way to get rid of all CSS added by modules?
Comment #12
star-szrCheck out hook_css_alter and hook_library_info_alter :)
Comment #28
smustgrave commentedThank you for sharing your idea for improving Drupal.
We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #29
smustgrave commentedwanted to bump 1 more time before closing.