Problem/Motivation

Following the MAT naming we should rename all *.icons.css files to modulename.icons.theme.css
It makes it easier for overview in the files to understand that the icons is purely visual elements & makes it possible for contrib to do a module (fx magic) that will clean out all *.theme.css files. Same approach is used with admin.theme.css files

Proposed resolution

Known icon css files renamed

contextual.icons.css -> contextual.icons.theme.css
shortcut.icons.css  -> shortcut.icons.theme.css 
toolbar.icons.css -> toolbar.icons.theme.css
user.icons.css -> user.icons.theme.css

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mortendk’s picture

mortendk’s picture

Status: Active » Needs work
mortendk’s picture

Status: Needs work » Needs review
Manuel Garcia’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

  • Applied the patch, did not see any visual regressions.
  • quickedit.icons.css gets pritned right after quickedit.theme.css, so the order the css rules are placed in the inside quickedit.theme.css by the patch is correct.
Manuel Garcia’s picture

Tested it with Bartik and Stark themes, both have no visual regressions.

Wim Leers’s picture

Status: Reviewed & tested by the community » Needs review

We have an <module name>.icons.css file for every module that uses /misc/icons/<RGB color>/<name>.svg for icons anywhere in the module. This simplifies overriding just the icons.

IOW, it allows:

  1. a theme to override all icons used across Drupal core with a different icon set
  2. a D8 contrib module to provide a central point/facility/API to switch to a different icon set
  3. a site to swap out a few specific icons

It's true that we don't have an Icon API in core, but by keeping the icons in separate CSS files, we at least keep things more organized, easier to find, and hence, easier for contrib to provide such an Icon API.

mortendk’s picture

@wim hmm we need to get that info into the css documentation as its mentioned there with the MAT file naming [#1887922]
- do we have a write up on it somewhere (sorry im lazy) why i wanted to move all theme into theme.css - cause in the end of it icons are still theme ?
Im thinking we need to rename at least to modulename.icon.theme.css, in that way we can still filter out all visual css by killing it on a *.theme.css

Wim Leers’s picture

But it does follow the SMACSS rules just fine. It's not like anything in the theme category MUST be in a single module_name.admin.theme.css file, right?

Renaming to *.icons.css to *.icons.theme.css sounds fine, that's a great TX improvement.

mortendk’s picture

nope not afaik - i think what we were talking about is having less files, so we dont end up with 10 css files for each module.

renamed the file to quickedit.icons.theme.css so it clear for the themer that this is pure visual

Wim Leers’s picture

Component: quickedit.module » CSS
Status: Needs review » Needs work

Then you'll want to do the same for the other *.icons.css files — this is not quickedit-specific.

mortendk’s picture

Title: merge quickedit.icons.css into quickedit.theme.css » rename *.icons.css files to *.icons.theme.css
Issue summary: View changes

check I just scope creep my self with my eyes open -lets do this right :)

mortendk’s picture

Issue summary: View changes
mortendk’s picture

Status: Needs work » Needs review
mortendk’s picture

forgot the patch ;)

mortendk’s picture

lets try this again with a patch thats only about icons

mortendk’s picture

here it is - somehow my patch-fu is not up to speed

Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quickfix, +TX (Themer Experience)

Perfect!

Manjit.Singh’s picture

Looks fine now. Thanks :)

LewisNyman’s picture

RTBC++

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 5b8809b on 8.0.x
    Issue #2421373 by mortendk, Wim Leers: rename *.icons.css files to *....

Status: Fixed » Closed (fixed)

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