mercredi 21 novembre 2018

icomoon icon font color

I use icomoon to generate colors icons, but it combines them from multiple glyphs off course, anyway can combines the spans to 1 only?

Because I will get data output in html and every row have a icon, and max character span number is 20, every row have 20span html DOM is too big. any solution or anyway can convert color icon but only 1 class?

.icon-test .path1:before {
  content: "\e906";
  color: rgb(144, 144, 144);
}
.icon-test .path2:before {
  content: "\e907";
  margin-left: -1em;
  color: rgb(255, 255, 255);
}
.icon-test .path3:before {
  content: "\e908";
  margin-left: -1em;
  color: rgb(252, 168, 57);
}
.icon-test .path4:before {
  content: "\e909";
  margin-left: -1em;
  color: rgb(96, 175, 221);
}
.icon-test .path5:before {
  content: "\e90a";
  margin-left: -1em;
  color: rgb(0, 188, 173);
}
<span class="icon-test">
  <span class="path1"></span><span class="path2"></span><span class="path3"></span><span class="path4"></span><span class="path5"></span>
</span>



Aucun commentaire:

Enregistrer un commentaire