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

loaded styles cause the page flash (and re-rendering) #7

Open
4 of 5 tasks
ms-fadaei opened this issue Jun 24, 2021 · 0 comments
Open
4 of 5 tasks

loaded styles cause the page flash (and re-rendering) #7

ms-fadaei opened this issue Jun 24, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@ms-fadaei
Copy link

Version

module: 0.1.1
nuxt: 2.15.7

Nuxt configuration

mode:

  • universal
  • spa

What is expected?

preloading external CSS shouldn't re-rendering the page

What is actually happening?

preloading external CSS forced the browser to rerender!

Steps to reproduce

just use the module (and nothing else)

Additional information

I think this is because of ordering (styles get overridden)
First of all, we have the inlined CSS in the head section.
After that, multiple external CSS files inserted with media preloading strategy.
When each file gets loaded, the browser re-render the page because other files not loaded yet, and the inlined CSS rules get overridden by the loaded external file.
this cycle gets happening until the last external CSS loaded.

Checklist

  • I have tested with the latest Nuxt version and the issue still occurs
  • I have tested with the latest module version and the issue still occurs
  • I have searched the issue tracker and this issue hasn't been reported yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant