[class^="icon-"], [class*=" icon-"] ? REALLY? WHY? It would be so much better to use TWO CLASSES!!! .icomoon .icon-blabla

55 views
Skip to first unread message

wgezezzo

unread,
May 22, 2014, 2:53:10 AM5/22/14
to ico...@googlegroups.com
Why are you using such performance-heavy way to target your icons???
Do you know that HTML elements can have 2 classes? and that it's compatible with all browsers even IE6?

Instead of:
<span class="icon-twitter"></span>

Simply use:
<span class="icomoon icon-twitter"></span>


And in your CSS,
Instead of:
[class^="icon-"], [class*=" icon-"] {
   ...
}

Simply use:
.icomoon {
   ...
}

.icon-twitter:before {
content: "\e001";
}

It's been years since I wanted to post this feedback as it's SOOOO obvious! I just hate Google Groups so much that I never wanted to participate anyway. 

Keyamoon

unread,
May 22, 2014, 12:53:26 PM5/22/14
to ico...@googlegroups.com
Font tab > Preferences > Use Class Selector

me

unread,
May 22, 2014, 1:24:46 PM5/22/14
to ico...@googlegroups.com
Oh that's great!

I believe this should be the default behavior.
Reply all
Reply to author
Forward
0 new messages