Material Design Icons Flicker (FOUT?)
Asked Answered
E

2

7

I have noticed on my angular 2 app that in IE 11 all my material design icons will flicker the text before showing the actual icon. Is there a solution to this? Is there a way to use some sort of preloader?

Engird answered 14/7, 2016 at 1:44 Comment(2)
Why the down votes?Engird
FOUT: Flashing of Unstyled TextCordon
E
0

I was able to solve my problem by using WebFontLoader

for 'Material Icons' font. Then using CSS I was able to select and fade in all icons once they were loaded

Engird answered 18/7, 2016 at 12:8 Comment(1)
See also github.com/angular/components/issues/…Primitive
C
5

An extremely simple way to solve this is to append display=block to the end of the URL.

For example:

<link href="https://fonts.googleapis.com/icon?family=Material+Icons&display=block" rel="stylesheet" />

See the comment here: https://github.com/angular/components/issues/12171#issuecomment-769333603

Cordon answered 1/2, 2022 at 21:4 Comment(0)
E
0

I was able to solve my problem by using WebFontLoader

for 'Material Icons' font. Then using CSS I was able to select and fade in all icons once they were loaded

Engird answered 18/7, 2016 at 12:8 Comment(1)
See also github.com/angular/components/issues/…Primitive

© 2022 - 2024 — McMap. All rights reserved.