7

CSS list

I would like to remove all CSSs automatically included from stable theme:

/core/themes/stable/css/system/components/*

I can remove them one by one inside the .info.yml file:

stylesheets-remove:
  - 'core/themes/stable/css/system/components/ajax-progress.module.css'
  - 'core/themes/stable/css/system/components/autocomplete-loading.module.css'
  - ...

Is there a way to remove all of them at once?

Something like:

stylesheets-remove:
  - 'core/themes/stable/css/system/components/*'
16

There's no wildcarding for the stylesheets-remove (FYI: there's a FR out there for it). However, you can use libraries-override to remove the library associated with the all CSS components you've highlighted:

libraries-override:
  system/base: false

It won't remove all CSS files in the stable theme, but it will condense removal of libraries that contain many CSS files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.