creativecommons / vocabulary

A cohesive system of design for Creative Commons
https://vocabulary-docs.netlify.app
Creative Commons Zero v1.0 Universal
2 stars 0 forks source link

[Bug] FOUC (flash of unstyled content) occurs erratically, causes a layout shift prior to fonts loading/rendering correctly #11

Open possumbilities opened 9 months ago

possumbilities commented 9 months ago

Description

When the site is first loaded, there is a brief FOUC, which delays the proper rendering of the included font-files, icons, etc.. This results in a layout shift on first load.

Afterwards, the files are cached and this doesn't usually occur again, but it is something we should address.

Reproduction

  1. Disable browser caching/reset cache
  2. Visit creativecommons.org
  3. See error.

Expectation

Site should load more smoothly on initial payload.

Screenshots

Screen Shot 2023-10-18 at 2 05 35 PM

Resolution