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

mdrummond created an issue. See original summary.

pguillard’s picture

StatusFileSize
new2.77 KB

Not complete, I don't know where to attach the library..

pguillard’s picture

Status: Active » Needs review
lewisnyman’s picture

Status: Needs review » Needs work
StatusFileSize
new2.43 KB

Reroll after #977844: Remove the 'every_page' option for CSS/JS assets: it is confusing, even damaging

  1. +++ b/core/themes/classy/classy.libraries.yml
    +++ b/core/themes/classy/classy.libraries.yml
    @@ -3,6 +3,9 @@ base:
    
    @@ -3,6 +3,9 @@ base:
       css:
         theme:
           css/layout.css: {}
    +      css/base/pager.theme.css: { every_page: true, weight: -10 }
    +      css/base/more-link.theme.css: { every_page: true, weight: -10 }
    +      css/base/exposed-filters.theme.css: { every_page: true, weight: -10 }
    

    Since we're not changing when these files are loaded, we can create a library called global-styling add load this library on every page. You can then load this library through the .info.yml file.

    See the Seven theme for an example.

  2. +++ b/core/themes/classy/classy.libraries.yml
    similarity index 100%
    rename from core/modules/system/css/components/exposed-filters.theme.css
    
    rename from core/modules/system/css/components/exposed-filters.theme.css
    rename to core/themes/classy/css/base/exposed-filters.theme.css
    

    base has a very specific meaning in SMACSS: elements with no classes on them.

    If we follow the discussion in #2489566: move file.theme.css to classy then I would move these files into a 'components' folder.

rainbowarray’s picture

Status: Needs work » Needs review
StatusFileSize
new5.73 KB

Reroll.

rainbowarray’s picture

StatusFileSize
new6.37 KB
new4.93 KB

Here's a revised patch with the fixes suggested in #4.

rainbowarray’s picture

Fixed my git settings to reduce patch size.

The last submitted patch, 6: 2553465-6-move-filters-more-pager-to-classy.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 7: 2553465-7-move-filters-more-pager-to-classy.patch, failed testing.

rainbowarray’s picture

Status: Needs work » Needs review
StatusFileSize
new2.38 KB

Redoing the reroll. I screwed something up in here.

rainbowarray’s picture

StatusFileSize
new2.76 KB
new1.86 KB

Hopefully this is a cleaner fix.

Status: Needs review » Needs work

The last submitted patch, 11: 2553465-11-move-filters-more-pager-to-classy.patch, failed testing.

rainbowarray’s picture

Status: Needs work » Needs review
StatusFileSize
new2.38 KB
new1.12 KB

Using base instead of global-styling library.

lauriii’s picture

Status: Needs review » Reviewed & tested by the community

No visual changes on Bartik or Seven.

davidhernandez’s picture

Looks good.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 7375a7b on 8.0.x
    Issue #2553465 by mdrummond, pguillard, LewisNyman: Move system exposed-...

Status: Fixed » Closed (fixed)

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