Subtheming Drupal 8

Submitted by admin on Sat, 11/21/2015 - 21:26

Themes are looking good. Especially subthemes. The small tweaks were managed by subthemeing Bartik which also includes carrying over all the settings from it.

My subtheme fixes the issues with the headings and the position of the logo. It's still a bit of a hack (the colour of the headings is hardcoded in the CSS rather than managed in the Color module (but hey... it's a quick fix)).

The first difference; Themes aren't in /sites/all/themes any more. They've been moved to the top level of the site and now live in /theme.

Difference the second;

The MY_THEME.info file is now MY_THEME.info.yml. For the most part it's the same details in it with a format change (to yaml) and a few extensions for how drupal now does things. The one of interest to me was the addition of libraries. These describe sections in the MY_THEME.libraries.yml file. Things in the MY_THEME.libraries.yml are loaded on an as needed basis with a number of ways of describing when they should be included. As far as I can tell global-styling is special sauce for "always include this". This is where my CSS was defined though.

After that it was just a matter of setting the new default theme and messing around in css/style.css to get things the way I wanted them.

Next up, I'm going to see if I can get the hero image to better position itself. This should lead me into messing with twig proper.

Overall impression so far: not as worried as I was.