google-material-icons

how to use google material icons as class instead of <i> tag


According to the guideline in the Google Material website we have to use material icons in _i _ tag.

the question is how to add the icons as font-awesome. something like :

Class="material-icons face"

instead of

<i class="material-icons"> face </i>


Solution

  • Yes,you can add the material icons as classes using the after pseudo elements.check out the fiddle

     <span class="material-icons face"></span>
    
    .face {
        position:relative;
        display:inline-block;
    }
    
    .face:after {
        content: "face";
    }