Is it possible to inherit theme files? I have 'Theme A' and 'Theme B'. The only difference between them is colors.css.

If I want to add Theme B, I have to copy the entire theme folder, change the info file and correct the name of the theme hooks in my .tpl files.

Is there a way I can have my second theme inherit all the files from Theme A (or just make 'theme A' use a different colors.css when user wishes to do so)?

Point of this is to make theming more easy for the end user, so that they just have to upload theme_b.info and colors.css?
If I am not mistaken, base themes do exactly what you describe.


For Drupal 7: https://www.drupal.org/docs/7/theming/creating-a-sub-theme
For Drupal 8: https://www.drupal.org/docs/8/theming-drupal-8/creating-a-drupal-8-sub-theme-or-sub-theme-of-sub-theme


In your case, you can use 'Theme A' as the base theme, and specify that 'Theme B' uses 'Theme A' as the base in the .info file. You can then override the CSS and other theme features as you wish.