Using Classy as a base theme

Last updated on
6 January 2017

Classy is a theme in Drupal 8 core and the base theme used by Bartik and Seven. Its HTML markup has many CSS classes which are structured in a way that will be familiar to users of BEM and SMACSS.  These naming conventions are powerful but not for everyone, and in the past, the classes Drupal adds have been viewed as helpful by some and a hindrance by others. In Drupal 8 you can elect to include them or not by choosing your preferred base theme.

If you want a full set of classes, define Classy as your base theme. Read more here: Creating a Drupal 8 sub-theme.

If you want your theme to have minimal CSS, don't use Classy as a base theme. Stable is recommended instead, it's also the default if a base theme is not specified.  For example, you may wish to use Stable if you don't want Drupal's classes to conflict with CSS and JS frameworks used by your theme. Excluding Classy gives you full responsibility for naming your classes.

More information