By lauriii on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.0.x
Introduced in version:
10.0.0
Issue links:
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:
- Change the base theme to Stable.
- Copy the preprocess functions from
classy.themeto the.themefile of your new theme. Rename the functions to begin withyourthemename_instead ofclassy_ - Determine which Classy
.html.twigtemplates are not overridden by your theme and copy them anywhere within your theme's/templatesdirectory. - Migrate libraries:
- Review
classy.libraries.ymland 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.classyso 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/imagesshould be copied to your theme.
- Review
Impacts:
Module developers
Themers
Comments
Shouldn't it be Stable9 theme
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.
Stable 9
You are right, looks like since this CR was created in '22, the optimal route has become to change base to Stable 9.