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

fix: flash of unstyled content (fouc) when fonts load #139

Open
ramboz opened this issue Apr 10, 2023 · 0 comments
Open

fix: flash of unstyled content (fouc) when fonts load #139

ramboz opened this issue Apr 10, 2023 · 0 comments
Assignees
Labels
bug Something isn't working 🛑 Blocked Issue is blocked by external dependency

Comments

@ramboz
Copy link
Collaborator

ramboz commented Apr 10, 2023

When the page initially loads, we have a FOUC when the fonts get loaded which creates a visual shift, and adds some CLS.

We have a few options to fix this:

  1. load the critical fonts part of the LCP in the eager phase (but will impact performance)
  2. Adjust the fallback font and size-adjust to closely match the final font. See https://www.hlx.live/developer/font-fallback
@ramboz ramboz added the bug Something isn't working label Apr 10, 2023
@ramboz ramboz self-assigned this Apr 26, 2023
@ramboz ramboz added the 🛑 Blocked Issue is blocked by external dependency label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🛑 Blocked Issue is blocked by external dependency
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant