internetarchive / internetarchive/openlibrary
Avoid flash of invisible text
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 138
Description
Fonts are often large files that take awhile to load. Some browsers hide text until the font loads, causing a flash of invisible text (FOIT).
**Pages:**
- [ ] Homepage
### Evidence / Screenshot (if possible)
#### Home Page delay:

### Proposal & Constraints
Leverage the font-display CSS feature to ensure text is user-visible while web fonts are loading.
- The easiest way to avoid showing invisible text while custom fonts load is to temporarily show a system font. By including font-display: swap in your @font-face style, you can avoid FOIT in most modern browsers:
[https://web.dev/font-display/?utm_source=lighthouse&utm_medium=devtools](https://web.dev/font-display/?utm_source=lighthouse&utm_medium=devtools)
### Stakeholders
@tabshaikh
Contributor guide
Assessment
This issue has not been assessed yet.