NathanWalker / nativescript-ngx-fonticon

Use custom font icon collections seamlessly with NativeScript + Angular.
MIT License
76 stars 39 forks source link

Fix/mdi compatibility #3

Closed arnaudvalle closed 8 years ago

arnaudvalle commented 8 years ago

Had a few problems while trying to integrate with https://materialdesignicons.com/

Their stylesheet generates icon classes with uppercase characters, i.e.:

.mdi-alert:before { content: "\F026"; }

The other fonts you use as example in this project (font awesome / ionicons) use lowercase (i.e. "\f026";) so this should make it works in both cases now.

Also I added a separate small fix that also makes it work with minified css files. Since the fonticon.service was splitting on ':before {' and not ':before{', it wasn't detecting my sets correctly (because of the extra space after the word before). It should now work in both cases.

@NathanWalker Let me know if it doesn't make sense.