Problem/Motivation

See: #2489460: [Meta] Move module.theme.css files to Classy or Seven

Proposed resolution

Move the CSS files to classy
Rename the files to remove the .theme. extension
Alter the system.base library so the CSS files are loaded with a similar weight to before

Remaining tasks

Test steps

Check that the CSS file was deleted from the module and added to Classy
Check that the references to that CSS file removed from the system module
Check that the CSS file is being loaded in the correct places in Classy
Check that there are no HTML classes in the module that relies on the theme CSS

User interface changes

None for Classy, Stark will be more Stark

API changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mdrummond created an issue. See original summary.

mortendk’s picture

i remember getting heavy pushback on moving icons a bout a year ago - gonna ping wimleers about it, so i can figure out what the issue was

star-szr’s picture

Status: Active » Needs review
FileSize
1.74 KB

Here's an attempt at messages.theme.css.

rudraram’s picture

All the below steps in the test are ok. Attaching a screenshot where the CSS file is being loaded.

2553461-4

rudraram’s picture

@Cottser The patch in #3 is getting rejected.

star-szr’s picture

Thanks @rudraram, rebased and here is a new patch.

Status: Needs review » Needs work

The last submitted patch, 6: move_system-2553461-6.patch, failed testing.

Status: Needs work » Needs review
LewisNyman’s picture

This works as expected in Classy, Bartik, and Seven.

emma.maria’s picture

Status: Needs review » Needs work

The issue title and patch work do not match. The patch only contains work for messages.theme.css, are we not doing the rest in this issue? Halp :-)

jaxxed’s picture

Assigned: Unassigned » jaxxed
jaxxed’s picture

new patch repeats the effort from #6, but duplicates it across progress, messages and icons.

Icons stylesheet is not treated as a library, but rather is a part of the base library. Progress and messages are treated as libraries, and only loaded when the twig templates are loaded.

comments?

jaxxed’s picture

Status: Needs work » Needs review
LewisNyman’s picture

This is looking good. I applied the patch and checked to make sure the files were still loading on the pages they should be, including the installation screen.

The only last thing concerning me is that the Classy files are loading after the sub-theme, meaning that they would overwrite any sub-theme CSS that conflicts. Is there an issue about this general problem with base themes?

In #2549563: Move system action-links.theme.css, breadcrumb.theme.css, and button.theme.css to Classy, it looks like they've solved the problem by keeping the weight: -10 value for the file. I think we could also do that here.

jaxxed’s picture

Updated #12 patch to lower weights

LewisNyman’s picture

Status: Needs review » Needs work

Sorry! Turns out that wasn't the solution:

+++ b/core/themes/classy/classy.libraries.yml
@@ -16,12 +17,24 @@ drupal.comment.threaded:
+    theme:
+      css/components/progress.css: { weight: -10 }

We need to change 'theme' to 'component'

jaxxed’s picture

Latest re-roll, changes theme elements to components.

jaxxed’s picture

css order on latest patch (please confirm)

jaxxed’s picture

Status: Needs work » Needs review
LewisNyman’s picture

Assigned: jaxxed » Unassigned
Status: Needs review » Reviewed & tested by the community

I can confirm that the CSS loading order is now correct. Thank you! *RTBC wand*

webchick’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

No longer applies due to #2553465: Move system exposed-filters.theme.css, more-link.theme.css, and pager.theme.css to Classy.

In fact, these are all going to step all over each other, so should we maybe do all of the moving in one patch?

Manuel Garcia’s picture

Assigned: Unassigned » Manuel Garcia

rrrrrrrrrerollin'

Manuel Garcia’s picture

Assigned: Manuel Garcia » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
3.81 KB

Reroll of #17. Fixed conflicts in:

  • core/modules/system/system.libraries.yml
  • core/themes/classy/classy.libraries.yml
LewisNyman’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! Looking good.

LewisNyman’s picture

Status: Reviewed & tested by the community » Postponed
davidhernandez’s picture

Status: Postponed » Closed (fixed)

The mega was committed so we don't need this.