Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment | File | Size | Author |
---|---|---|---|
#16 | rename-icons-css-to-icon-theme-css-16.patch | 3.4 KB | mortendk |
#15 | rename-icons-css-to-icon-theme-css-15.patch | 3.4 KB | mortendk |
#14 | rename-icons-css-to-icon-theme-css.patch | 4.55 KB | mortendk |
#9 | quickedit-icons-theme-css.patch | 752 bytes | mortendk |
#1 | merge-quickedit-theme-2421373-1.patch | 4.06 KB | mortendk |
Comments
Comment #1
mortendk CreditAttribution: mortendk commentedComment #2
mortendk CreditAttribution: mortendk commentedComment #3
mortendk CreditAttribution: mortendk commentedComment #4
Manuel Garcia CreditAttribution: Manuel Garcia commentedLooks good to me.
quickedit.icons.css
gets pritned right afterquickedit.theme.css
, so the order the css rules are placed in the insidequickedit.theme.css
by the patch is correct.Comment #5
Manuel Garcia CreditAttribution: Manuel Garcia commentedTested it with Bartik and Stark themes, both have no visual regressions.
Comment #6
Wim LeersWe 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:
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.
Comment #7
mortendk CreditAttribution: mortendk commented@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
Comment #8
Wim LeersBut it does follow the SMACSS rules just fine. It's not like anything in the
theme
category MUST be in a singlemodule_name.admin.theme.css
file, right?Renaming to
*.icons.css
to*.icons.theme.css
sounds fine, that's a great TX improvement.Comment #9
mortendk CreditAttribution: mortendk commentednope 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 visualComment #10
Wim LeersThen you'll want to do the same for the other
*.icons.css
files — this is notquickedit
-specific.Comment #11
mortendk CreditAttribution: mortendk commentedcheck I just scope creep my self with my eyes open -lets do this right :)
Comment #12
mortendk CreditAttribution: mortendk commentedComment #13
mortendk CreditAttribution: mortendk commentedComment #14
mortendk CreditAttribution: mortendk commentedforgot the patch ;)
Comment #15
mortendk CreditAttribution: mortendk commentedlets try this again with a patch thats only about icons
Comment #16
mortendk CreditAttribution: mortendk commentedhere it is - somehow my patch-fu is not up to speed
Comment #17
Wim LeersPerfect!
Comment #18
Manjit.SinghLooks fine now. Thanks :)
Comment #19
LewisNyman CreditAttribution: LewisNyman commentedRTBC++
Comment #20
webchickCommitted and pushed to 8.0.x. Thanks!