Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a Bartik sub-theme in Drupal 8

Tags:

drupal-8

I have been playing with Drupal 8. At the moment I want to have an image as the header background in Bartik. For this I created a subtheme called "freex" in the following way:

Create folder freex in /themes/custom/

Create freex.info.yml in /themes/custom/freex/ containing:

name: Freex
description: Basis thema voor verenigingen
type: theme
core: 8.x
base theme: bartik

libraries:
  - freex/global-styling

Create file freex.libraries.yml in /themes/custom/freex/ containing:

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

Create file in /themes/custom/freex/css/ called style.css containing:

#header {
background-color: yellow;
}

Just to see of it works... It doesn't, the header does not change background color. Any ideas as to what I am missing?

like image 860
Freek Avatar asked Apr 09 '26 18:04

Freek


1 Answers

Turn off the page cache: Configuration Menu -> Development -> Performance Uncheck the checkboxes : Aggregate Css files, aggregate javascript files. If you do this, when you see page source, you see your file name style.css - not the generated css file name, as you write. At the top of the performance page, click to clear all cache. And after that, see your page.

like image 92
Ann Avatar answered Apr 12 '26 20:04

Ann