I'm working on a sub-theme of Bootstrap Barrio, which includes a table.css stylesheet. I don't want this stylesheet from the parent theme to be included in my sub-theme.

How do I eliminate a CSS file from sub-theme's parent?

  • On a closer read, the title of the question didn't reflect the body of the question, which did actually ask how to remove the parent css file, so yes, thanks @leymannx. I just edited the title of the other question to correct the discrepancy and hopefully help others find the question. – glenviewjeff Jun 9 at 2:31

You can override it by adding a blank file with the same name in your theme (or you can add your own contents). Or, you can remove it altogether with libraries exclude: https://www.drupal.org/docs/theming-drupal/adding-stylesheets-css-and-javascript-js-to-a-drupal-theme#override-extend

| improve this answer | |
  • Thanks, tried this but I must be doing something wrong. Please see this question. – glenviewjeff Jun 9 at 16:44
  • 1
    Well, this is the answer to the current question that you asked. Why your implementation is not working is a new question (which you've correctly asked in a new thread). I don't have an answer to that one. – Jaypan Jun 9 at 18:23

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