jerboa88 / Mergist

Mergist is an online tool to combine multiple PDF files into one
http://mergist.johng.io/
MIT License
3 stars 0 forks source link

Fix FOUC issues for icons and custom fonts #6

Closed jerboa88 closed 2 years ago

jerboa88 commented 2 years ago

Helpful info

Describe the bug On page load, various styles aren't applied immediately, causing disruptive FOUC. Examples include:

Steps to reproduce Steps to reproduce the behavior:

  1. Reload the page
  2. See FOUC

Expected behavior Either a loading screen should be shown to cover the partially loaded page or the icons should be shown with their final layout positions/sizes when the page first loads.

Screenshots image

Other For the text, we should specific a default font that is much closer to the desired font so that any font changes are less noticeable. In addition, we could make the text transparent until it is ready to display.

For the icons, this is likely an issue with font-awesome styles loading later than the page content. This issue is mentioned in the FontAwesome docs.