Search code examples
google-chromefont-awesomestylesheet

font-awesome icons not showing up in Chrome 61


I've downloaded font-awesome icons in my project and imported font-awesome.min.css as

<link rel="stylesheet" href="resources/font-awesome/css/font-awesome.min.css">

And used them simply like

<i class="fa fa-user-o" aria-hidden="true"></i>
  • The stylesheet was loaded so there was no problem with the path.

  • The icons worked fine in Firefox, but didn't show up in Chrome 61 at all, neither in Win 10 nor Linux, so I guess it has nothing to do with OS.

  • I don't have any plugin in Chrome that would be conflicting.

  • I've also tried <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> but nothing changed.

Does anyone know what might cause this problem? Thanks!


Solution

  • Forgot to mention, I'm using Polymer. And here is a solution I found.

    1. install polymer-font-awesome with npm:

      npm i polymer-font-awesome

    2. add the following dependency to polymer.json:

      "extraDependencies": ["node_modules/polymer-font-awesome/dist/fonts/*"]

    3. import these two files:

      <link rel="import" href="node_modules/polymer-font-awesome/dist/font-face.html">
      <link rel="import" href="node_modules/polymer-font-awesome/dist/font-awesome.html">

    4. include stlye module:

      <style type="text/css" include="font-awesome"></style>

    Clear the cache in Chrome and it worked for me.