0
votes

I am a total Drupal beginner. I set up a Drupal Sub Theme, it is activated and working. I took the Bootstrap Theme. Now I was trying to add my custom css.

This is my Tree:
enter image description here

libraries.yml

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

info.yml

core: 8.x
type: theme
base theme: bootstrap

name: 'Recipes'
description: 'Uses the jsDelivr CDN for all CSS and JavaScript. No source files or compiling is necessary and is recommended for simple sites or beginners.'
package: 'Bootstrap'

regions:
  navigation: 'Navigation'
  navigation_collapsible: 'Navigation (Collapsible)'
  header: 'Top Bar'
  highlighted: 'Highlighted'
  help: 'Help'
  content: 'Content'
  sidebar_first: 'Primary'
  sidebar_second: 'Secondary'
  footer: 'Footer'
  page_top: 'Page top'
  page_bottom: 'Page bottom'
  myregion: 'meine neue Region'

libraries:
  - 'recipes/global-styling'

I hope you can help me :)

2

2 Answers

0
votes

Try this one

libraries.yml

global-styling:
  version: VERSION
  css:
    base:
      css/style.css: {}

info.yml

libraries:
  - recipes/global-styling
0
votes

Your solutions should work, You have to clear the cache from admin or database. it can work, like my.

global-styling:
  css:
    theme:
      css/style.css: {}
      css/custom.css: {}

libraries:
  - 'bootstrap_subtheme/global-styling'

Thanks