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
Comments
Comment #2
mortendk CreditAttribution: mortendk as a volunteer commentedi 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
Comment #3
star-szrHere's an attempt at messages.theme.css.
Comment #4
rudraram CreditAttribution: rudraram at Axelerant commentedAll the below steps in the test are ok. Attaching a screenshot where the CSS file is being loaded.
Comment #5
rudraram CreditAttribution: rudraram at Axelerant commented@Cottser The patch in #3 is getting rejected.
Comment #6
star-szrThanks @rudraram, rebased and here is a new patch.
Comment #9
LewisNymanThis works as expected in Classy, Bartik, and Seven.
Comment #10
emma.mariaThe 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 :-)
Comment #11
jaxxed CreditAttribution: jaxxed at Wunder commentedComment #12
jaxxed CreditAttribution: jaxxed at Wunder commentednew 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?
Comment #13
jaxxed CreditAttribution: jaxxed at Wunder commentedComment #14
LewisNymanThis 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.Comment #15
jaxxed CreditAttribution: jaxxed at Wunder commentedUpdated #12 patch to lower weights
Comment #16
LewisNymanSorry! Turns out that wasn't the solution:
We need to change 'theme' to 'component'
Comment #17
jaxxed CreditAttribution: jaxxed at Wunder commentedLatest re-roll, changes theme elements to components.
Comment #18
jaxxed CreditAttribution: jaxxed at Wunder commentedcss order on latest patch (please confirm)
Comment #19
jaxxed CreditAttribution: jaxxed at Wunder commentedComment #20
LewisNymanI can confirm that the CSS loading order is now correct. Thank you! *RTBC wand*
Comment #21
webchickNo 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?
Comment #22
Manuel Garcia CreditAttribution: Manuel Garcia at Appnovation commentedrrrrrrrrrerollin'
Comment #23
Manuel Garcia CreditAttribution: Manuel Garcia at Appnovation commentedReroll of #17. Fixed conflicts in:
Comment #24
LewisNymanThanks! Looking good.
Comment #25
LewisNymanPostponed on: #2566597: [Mega patch] Move system *.theme.css files to Classy
Comment #26
davidhernandezThe mega was committed so we don't need this.