Angular Material icons not working

前端 未结 14 2189
走了就别回头了
走了就别回头了 2020-12-23 20:27

I\'ve installed Material for angular,

I\'ve imported on my app module MatIconModule (with import { MatIconModule } from \'@angular/material/icon\';)

14条回答
  •  执笔经年
    2020-12-23 20:38

    I ran into the issue of icons not displaying for me. I had followed the steps provided by Basavaraj Bhusani however still not working.

    I found the issue was that in my scss, I had the text-transform: uppercase which was causing the icon to just display the content 'arrow_forward'. I had to change the text-transform: none on the icon specifically otherwise it would not render.

                    .child-item-action {
    
                        text-transform: uppercase;
    
                        &:after {
    
                            font-family: 'Material Icons';
                            content: "arrow_forward";
                            text-transform: none;
                            -webkit-font-feature-settings: 'liga';
    
                        }
    

提交回复
热议问题