Creating a custom theme based on Classy

Drupal 8 ships with a new base theme that is intended to demonstrate the best practice and CSS class management. The Classy theme is provided by 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 as a means to jump start Drupal theming. Stable provides a more lean approach to frontend theming with fewer classes and wrapping elements. In this recipe, we will create a new theme called mytheme that uses Classy as its base.

How to do it...

  1. In the root directory of your Drupal site, create a folder called mytheme in the themes folder.
  2. Inside the mytheme folder, create ...

Get Drupal 8: Enterprise Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.