0

I am trying to extend the Thunder Admin theme by creating a sub-theme in it. This is my first time making a sub-theme in Drupal 8 (other than from bootstrap starter kits).

I would have thought that a basic sub-theme would have inherited the css and js from its parent as is explained here

All I can see that I should need to do is to create a directory i.e. my_theme and create my_theme.info.yml and my_theme.libraries.yml.

The content of this file is as follows:

my_theme.info.yml

name: My Theme
type: theme
core: 8.x
base theme: thunder_admin
description: 'Extends Thunder Admin'

libraries:
  - thunder_admin/global-styling

regions:
  header: 'Header'
  pre_content: 'Pre-content'
  highlighted: Highlighted
  content: Content
  page_top: 'Page top'
  page_bottom: 'Page bottom'
  sidebar_first: 'First sidebar'
regions_hidden:
  - sidebar_first

my_theme.libraries.yml

global-styling:
  css:
    component:
      css/style.css: {}

Can any one please explain to me where I am going wrong please? I have flushed every cache I can think of

1 Answer 1

0

Can any one please explain to me where I am going wrong please?

libraries:
  - thunder_admin/global-styling

There is no need to load the base theme's library, so this needs to be your theme's library.

libraries:
  - my_theme/global-styling

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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