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.
- In the root directory of your Drupal site, create a folder called
mytheme
in thethemes
folder. - Inside the
mytheme
folder, create amytheme.info.yml
file so that Drupal can discover thetheme
. We will then edit this file:
- First, we will need to define the
themes
name using thename
key:
name: My Theme
- All the...