This is the fifth day of my participation in the November Gwen Challenge. Check out the details: The last Gwen Challenge 2021

The cause of

The company has recently changed its organizational structure. Have an idea or have a reconstruction, first set the end of a month), was pulled to a project team to do a new project. Status quo of ICONS here: Some projects use font-face, some use Ali icon library, and recently Tencent icon library, and some even cut images directly.

Embrace change and new technology. The new project uses SVG to introduce ICONS. There is one place where the icon has two states: selected and unselected. According to the way I used font face before, I only need to transfer one set of design, and I will change the color. Since many big names (such as Zhang Xinxu) say that SVG Sprites are several floors taller than Font Face, it must also support color change.

This I will brush a big guy SVG icon change color, easy to understand, very comprehensive.

External representations

I tried everything, and nothing worked. Boy, it’s a tight schedule. You don’t want to worry about why, and then you want to find two sets of designs. The following conversation occurred:

Design: You how can't change me again: this is the kind of SVG that use ah, can't change the design: oneself next time go to try design more: another can, you can't negotiate ing.... I: Bala Bala (cut figure, also can, icon library also can, anyway give me two sets of bar) design: lazy to say with you, I busy very I (heart) : this person how can once poke middleman's anger point, I am not busy?Copy the code

Either one. You can’t. It can kill you, so I’m gonna stop working and see if I’m not. Font face could not change the color last time, it seems that there is a problem with the background color. Not this time?

Troubleshoot problems

Find an icon library

Since the other one will do, you can’t. I doubt whether Tencent icon library is not line, Ali can. So add a few random items to the Ali icon library and download them.

Compare the paths of the two ICONS

why

So when SVG is generated, the fill attribute is set, and the color cannot be changed. Modify method, need to design side upload monochrome icon.

feeling

  1. Knowledge is not enough, professional knowledge is not strong, so external eat.
  2. Communication skills: The next time someone says there’s something wrong with my page. I first say: other people computer can, but you can’t. Go back and try again, reload your browser and refresh it more often. I was busy at the end. Aren’t you busy? This will deepen the relationship with colleagues.
  3. Use this with caution. Boss a word, the bottom busy into a dog. Why do the workers bother the workers?