In Drupal 10, the Classy theme has been replaced by the new Starterkit theme builder. The Starterkit theme builder is now the recommended way to create new themes, rather than setting a theme's base theme - a core theme such as Classy. Note that this is specific to creating new themes, and there are no automated tools to convert existing themes to take advantage of Starterkit.
Existing themes using 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 following the steps below:
- Change the base theme to Stable.
- Copy the preprocessing functions from classy.theme to your new theme's .theme file. Rename functions to start with yourthemename_ instead of classy_
- Determine which Classy .html.twig templates are not overridden by your theme and copy them anywhere within your theme's /templates directory.
- Migrate libraries:
- Review classy.libraries.yml and determine which libraries defined there are not overridden by your theme,
- Copy the un-overridden library definitions to your_theme.info.yml. Once copied, we recommend prepending the library names with .classy to make it clear which libraries were previously Classy.
- The js/css assets referenced by the new libraries must be copied from Classy to your theme. Keep the same directory structure within the theme to avoid having to change library definitions.
- In the CSS copied from Classy, check any references to images, such as url(../../core/misc/some-image.jpg). Update the image paths to work with your theme, and the images you want from /core/themes/classy/images should be copied to your theme.