What is a theme and how do I get started making one for my site? This tutorial introduces the concept of theming at a very high level and points to additional tutorials about more specific aspects of theme development in order to help people get started.
Themes in Drupal are responsible for the look and feel of your site. They provide the HTML markup, CSS, typography, images, and interactive experience that people encounter when they view your site. Each theme is a set of files including style sheets, Twig templates, Drupal-specific YAML files, images, and more, all contained within a directory. There are hundreds of community-contributed themes available. Themes are often one of the first places you'll start to modify the code and make your Drupal site truly unique.
Developers can create new themes to customize the look and feel of a site. This can be done by either extending an existing theme and making minor changes, or creating a completely custom design.
There are three different types of themes:
- core themes: themes that are included with Drupal core and live in the /core/themes directory
- contributed themes: themes that are download from Drupal.org, and are typically placed in the /themes/contrib directory
- custom themes: themes that you or a theme developer created specifically for your use-case, and are typically placed in the /themes/custom directory
- Install a new theme
- Change the overall appearance of your Drupal site
- Modify the appearance of specific pages, or elements on a page
The basic concept of themes, how they are integrated into a Drupal site, and the role they play is unlikely to change. While it is possible to do so, there is little reason to use anything other than Twig as your theme engine.
There is a full guide for learning to Work with Drupal Themes and Front-end. The main, starting component of that guide is the extensive Drupal 8 Theming Guide that covers everything you need to know about using, and creating, themes in Drupal. Here are some good starting places: