Skip to content

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

@ms-fadaei

Description

@ms-fadaei

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions