Problem/Motivation

Classy will be moved to contrib during Drupal 9. In preparation to that, we have to remove dependencies on Classy from all core themes.

Proposed resolution

Use this spreadsheet of Core Theme's use of Classy as reference

Create theme-specific versions of all libraries that are not already overridden by the theme.

Copy all remaining Templates and CSS that are not already overridden by the theme and remove dependency to Classy. Some templates in Classy are identical to Stable and can be removed instead of copied. This is covered by #3098150: Add test coverage to ensure Classy templates that have identical versions in Stable are kept in sync

Themes subtheming Classy should not depend on preprocess/alters in classy.theme. The issue for this is: #3109287: Decouple Classy-inheriting themes from Classy's preprocess functions

Theme specific issues:
Claro: #3084810: Decouple Claro from Classy, #3108109: Decouple Classy libraries from Claro
Umami: #3096014: [META] Make Umami theme non-dependent on Classy
Seven: #3107872: Decouple Classy libraries from Seven
Bartik #3108181: Decouple Classy libraries from Bartik

Remaining tasks

Once the test procedure and directory naming is settled, create multiple issues for moving templates/libraries to themes. Consider grouping similar templates in an issue to reduce the total number of issues, but the scope should remain reasonable for each.

User interface changes

API changes

Data model changes

Release notes snippet

Comments

lauriii created an issue. See original summary.

davidhernandez’s picture

We'll need some announcement around this. People are prone to copy Bartik and Seven, so it would be good to let them know this dependency on Classy is going away and they should do the same thing core is doing and copy its templates to their theme.

lauriii’s picture

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

bnjmnm’s picture

Issue summary: View changes

At the time I'm writing this the Core Theme's use of Classy has documented everything other than CSS files. There are two takeaways I wanted to share here as soon as possible.

  1. 24 of the 113 templates in Classy are identical to their equivalents in Stable (reference the spreadsheet's "Templates" tab, look for the ones labeled "can use stable". It seems like these would not need to be copied to other themes, but since they account for 20% of the templates in Classy, I'm wondering if there's a reason for their presence that I'm overlooking.
  2. Based on my info gathering, it seems like a good first step would be moving Classy's libraries. Since most (probably all) of these libraries are used by multiple themes, I think it would be most effective to move them to a centralized location that is available to all themes rather than duplicating the library in every theme. This boils down to two questions:
    a) Is it a sound approach to move Classy's libraries to a single new place where they are available to all themes?
    b) If it is a sound approach, would this be best implemented as core libraries, in Stable, or somewhere else?
bnjmnm’s picture

bnjmnm’s picture

Discussed my questions in #5 with @lauriii, this is what was concluded
#5.1: Templates that are identical in Classy and Stable do not need to be copied. These themes can inherit those templates from Stable.

#5.2: For the time being, each theme will get their own copies of the libraries they previously acquired via Classy. Centralizing these libraries is possibly desirable, but can be done in a followup.

bnjmnm’s picture

Moving forward on this depends on these three issues:

bnjmnm’s picture

Issue summary: View changes

Added theme-specific parent issues to issue summary.

lauriii’s picture

Issue summary: View changes
lauriii’s picture

I discussed with @xjm about backporting this to 8.9.x in #3095713-20: Create classy directory with README, in the templates and css directories for all themes subtheming Classy. Summary of the discussion is that we should backport a version of the patch that copies all the templates to Drupal 8.9.x, but keeps the base theme setting as Classy. This means that pre-existing template extends and library overrides and extends should continue to work.

Devipriya Rajamanickam’s picture

Assigned: Unassigned » Devipriya Rajamanickam
Devipriya Rajamanickam’s picture

Assigned: Devipriya Rajamanickam » Unassigned
bnjmnm’s picture

Issue summary: View changes
bnjmnm’s picture

Issue summary: View changes
bnjmnm’s picture

Issue summary: View changes
bnjmnm’s picture

Issue summary: View changes
bnjmnm’s picture

gábor hojtsy’s picture

Title: Remove dependency to Classy from core themes » [META] Remove dependency to Classy from core themes
lauriii’s picture

Issue summary: View changes
lauriii’s picture

Issue summary: View changes
lauriii’s picture

Issue summary: View changes
lauriii’s picture

Issue summary: View changes
lauriii’s picture

Status: Active » Fixed

Yay! The final issue of this meta has been committed: #3115088: Remove Classy as a base theme of core themes. 🎉

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.