Skip to content
New issue

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

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

Already on GitHub? # to your account

Change FOUT back to FOIT #917

Merged
merged 1 commit into from
May 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sass/_theme_variables.sass
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ $custom-font-family: "Roboto Slab", "ff-tisa-web-pro", "Georgia
$custom-font-family2: Georgia, serif
$code-font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace

$font-display: swap
$font-display: block
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we might try fallback here:

fallback: Acts as a compromise between the auto and swap values. The browser will hide the text for about 100ms and, if the font has not yet been downloaded, will use the fallback text. It will swap to the new font after it is downloaded, but only during a short swap period (probably 3 seconds).

It seems like it might be a better experience for folks with really slow connections, since the font won't change after they start reading the page. I don't feel strongly tho.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fallback has it's own issues. You'll still see the unstyled text flash, as the block period is short, and then if the fonts don't load in the swap period, the unstyled text will stick around without ever showing the downloaded fonts -- and the downloaded fonts are still transferred, just never used.