Last active
July 15, 2016 18:11
-
-
Save anythinggraphic/487aaec7ffa95e02f1f2 to your computer and use it in GitHub Desktop.
Typekit FOUT Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- We have to tell Cloudflare to ignore Typekit scripts to stop the flash of text on load (FOUT). We apply that to our scripts, but you can find out more about the data attribute here: https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-my-script-s-in-Automatic-Mode- --> | |
<!-- Also read http://anythinggraphic.net/fix-for-fout-while-using-typekit-and-cloudflare --> | |
<script data-cfasync="false" type="text/javascript" src="http://use.typekit.com/xxxxxxx.js"></script> | |
<script data-cfasync="false" type="text/javascript">try{Typekit.load();}catch(e){}</script> | |
<style type="text/css"> | |
.wf-loading { | |
/* Hide the blog title and post titles while web fonts are loading */ | |
visibility: hidden; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- TypeKit Blog Post about FOUT: http://blog.typekit.com/2010/10/29/font-events-controlling-the-fout/ --> | |
<!-- Also read http://anythinggraphic.net/fix-for-fout-while-using-typekit-and-cloudflare --> | |
<script type="text/javascript" src="http://use.typekit.com/xxxxxxx.js"></script> | |
<script type="text/javascript">try{Typekit.load();}catch(e){}</script> | |
<style type="text/css"> | |
.wf-loading { | |
/* Hide the blog title and post titles while web fonts are loading */ | |
visibility: hidden; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment