I'm using the material icon support for developing a chrome extension. My main.css file contains the following snippets:
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: local('Material Icons'), local('MaterialIcons-Regular'), url(https://fonts.gstatic.com/s/materialicons/v7/2fcrYFNaTjcS6g4U3t-Y5ZjZjT5FdEJ140U2DJYC3mY.woff2) format('woff2');
}
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
word-wrap: normal;
-webkit-font-feature-settings: 'liga';
-webkit-font-smoothing: antialiased;
The CSS is included in the index page of the chrome extension and I'm attempting to use 3 icons from this library within a navigation bar like this:
<nav>
<div class="nav-wrapper">
<ul id="nav-mobile" class=" hide-on-med-and-down">
<li><a href="#"><i class="material-icons left dp48">settings</i>Settings</a></li>
<li><a href="#"><i class="material-icons left dp48">web</i>Our Page</a></li>
<li><a href="#"><i class="material-icons left dp48">payment</i>Donate</a></li>
</ul>
</div>
</nav>
When opening this html page in a classic manner the icons are rendered but when importing the unpacked extension in Chrome, the icons are not rendered and nor is the link text (Settings, Our Page, Donate). Also, no errors occur in the dev console when inspecting the extension popup.
My guesses are that this problem is caused by loading these icons/fonts from a remote location. Is there any way to make them work that does not involve downloading resources?