- Issue created by @rhovland
- 🇺🇸United States rhovland Oregon
Was able to reuse the css variables for the icons and use a css filter to set their color to match the administration toolbar.
I added styles for the toolbar-tray. I did not add styles for the toolbar-bar since an admin cannot move menu items into that menu.
I was not able to use mask to set the color because that requires an actual dom element to function properly and modifying the structure of the toolbar isn't really a good idea if it's even possible.
- Merge request !367#3487326 by rhovland: Add icons for commerce menu items → (Merged) created by rhovland
- 🇷🇸Serbia majmunbog
I was not able to use mask to set the color because that requires an actual dom element to function properly and modifying the structure of the toolbar isn't really a good idea if it's even possible.
@rhovland I prefer we use a mask image. Can you explain how this is not functioning properly?
- 🇺🇸United States rhovland Oregon
When I tried it it masked the entire menu item. Maybe I did it wrong? I'm not familiar with using mask to change svg color.
- 🇷🇸Serbia majmunbog
This should work:
.toolbar-tray .toolbar-icon.toolbar-icon-entity-commerce-order-collection::before { mask-image: var(--commerce-icon--clipboard-check-fill); background-color: #787878; mask-repeat: no-repeat; mask-position: center; }
And then for active just change the background color.
It would be great if we had a class for all commerce toolbar items.
The existing icon should also be moved to a variable at some point. - 🇷🇸Serbia majmunbog
The MR has been updated and needs thorough review. I've also updated the standard Commerce icon (drupal cart) to be used as a mask image.
- 🇺🇸United States rhovland Oregon
Thank you for making these updates. I tested the 0eecdb17 version of the MR and it works!
- First commit to issue fork.
-
jsacksick →
committed bcded7b0 on 3.0.x authored by
rhovland →
Issue #3487326: Add icons for commerce menu items
-
jsacksick →
committed bcded7b0 on 3.0.x authored by
rhovland →