Change record status: 
Project: 
Introduced in branch: 
10.0.x
Introduced in version: 
10.0.0
Description: 

In Drupal 10, the Classy theme has been replaced by the new Starterkit theme generator. The Starterkit theme generator is now the recommended way to creating new themes, to be done instead of setting a theme's base theme: to core theme such as classy . Note that this is specific to creating new themes, and there is no automated tooling to convert existing themes to leverage Starterkit.

Existing themes that use Classy as a base theme can continue to use Classy from a contributed project .

If you want to remove your theme's dependency on Classy, you can do so by using the following steps:

  1. Change the base theme to Stable.
  2. Copy the preprocess functions from classy.theme to the .theme file of your new theme. Rename the functions to begin with yourthemename_ instead of classy_
  3. Determine which Classy .html.twig templates are not overridden by your theme and copy them anywhere within your theme's /templates directory.
  4. Migrate libraries:
    • Review classy.libraries.yml and determine which libraries defined there are not overridden by your theme,
    • Copy the non-overriden library definitions to your_theme.info.yml. Once copied over, we recommend prefixing the library names with .classy so it's clear which libraries were formerly from Classy.
    • The js/css assets referenced by the new libraries should be copied from Classy to your theme. Maintain the same directory structure within the theme to avoid having to change any library definitions.
    • In the CSS copied from Classy, review any references to images, such as url(../../core/misc/some-image.jpg). Update the image paths to work with your theme, and images you want from /core/themes/classy/images should be copied to your theme.
Impacts: 
Module developers
Themers

Comments

stefan.korn’s picture

Shouldn't it be Stable9 theme to switch the base theme to? as per https://www.drupal.org/node/3309392 stable theme is deprecated itself too.

rovo’s picture

You are right, looks like since this CR was created in '22, the optimal route has become to change base to Stable 9.