Creating a custom theme based on Classy
Drupal 8 ships with a new base theme that is intended to demonstrate best practice and CSS class management. The Classy theme is provided by the Drupal core and is the base theme for the default frontend theme, Bartik, and the administrative theme, Seven.
Unlike the previous versions of Drupal, Drupal 8 provides two base themes--Classy and Stable--to jump start Drupal theming. Stable provides a leaner approach to frontend theming with fewer classes and wrapping elements and is guaranteed to not introduce changes that may disrupt your child theme. In this recipe, we will create a new theme called mytheme that uses Classy as its base.
How to do it...
- In the root directory of your Drupal site, create a folder called
mythemein thethemesfolder. - Inside the
mythemefolder, create amytheme.info.ymlfile so that Drupal can discover thetheme. We will then edit this file:

- First, we will need to define the
themesname using thenamekey:
name: My Theme
- All the...