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.
By gintass on
I can't find any information on what Drupal 8 sub-theme inherits from it's base theme.
For example this page nicely explains what is inherited by Drupal 7 sub-theme:
https://www.drupal.org/node/225125
but there is nothing about inheritance on this page that talks about creating a Drupal 8 sub-theme:
https://www.drupal.org/node/2165673
Comments
Is there something specific
Is there something specific you need to know about - for sure templates, JS, CSS and preprocess functions are inherited. Some things don't work very well from the base theme, e.g. HOOK_library_info_build(). Just ask if there is something in particular you need to know about, but I do agree we need a new docs page - how about starting one?
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Thank you for your response.
Thank you for your response.
I wasn't sure if the files like my_theme.theme, my_theme.breakpoints.yml as well as templates are being inherited from the base theme. I was expecting that they will be inherited, but couldn't get my sub-theme to work. I kept getting errors or blank page, but now I found out that tabs are not allowed in yml files. I don't know if this was the problem, but now my sub-theme is working and templates, css, js as well as .theme and .breakpoints.yml files are being inherited.
Check this
Hi,
Refer this https://www.drupal.org/docs/8/theming/sub-theme-inheritance