Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add updates to prevent FOUC #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add updates to prevent FOUC #7

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 16, 2015

Added a quick example (and doc) on how to hide text block while custom font is loading.

@patrickmarabeas
Copy link
Owner

This doesn't allow for each font to appear as loaded - couldn't we simply hide/show content based on fontName/no-fontName classes on html element?

@ghost
Copy link
Author

ghost commented Feb 16, 2015

Ah your right. What are you thinking for showing/hiding content based on the fontName/no-fontName classes?

@patrickmarabeas
Copy link
Owner

Ah assumed fontName class was added on success. Could either do that, or add a fontName-loading class

@ghost
Copy link
Author

ghost commented Feb 17, 2015

Reworked the styles and JS a bit so there is a class hook to hide elements using custom fonts on load. Then hooked into the fontname class that is added on success/failure to display elements using custom fonts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant