Icomoon the best way

Hi,
I looking for the best way for use it in Roots, right now I put in the *.zip folder in fonts/
I unzip
then, in the main.less I add:
// icomoon │
@import “assets/fonts/icomoon/style.css”;

But that doest work:
…/wp-content/themes/roots-master/assets/css/assets/fonts/icomoon/style.css 404 (Not Found)

EDIT:
I wrote in the file "assets/less/main.less:
26 // fonts icomoon .
27 @import “style.css”;
And I copy
icommon.svg
icommon.ttf
icommon.eot
icommon.woff
style.css

That works but is not really good and clean.

Another idea ?

Why not install it with Bower? https://github.com/layerssss/icomoon-bower

1 Like

Thank you for this!
But I don’t really download all icons, i need just some, I will test it anyway.
What’s the cons and pros ?

I think you answered your own question. Obviously it may be quicker, but Bower installs all the icons including those you may not need.

It seems like in your original attempt your @import "assets/fonts/icomoon/style.css"; points to the wrong directory. If all you did was extract the icomoon zip file into your assets/fonts directory then that’s where style.css is, but main.less is in a different directory so you need to give your @import rule the correct relative path.

Here’s a quick refresher on structuring your paths correctly: http://css-tricks.com/quick-reminder-about-file-paths/