-
Notifications
You must be signed in to change notification settings - Fork 17
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
Reduce FOUC of Web-Components #365
Comments
IMHO the best approach would be to disable |
Dealing with FOUC of custom elements is really pure pain 😭 Here are all approaches I came up with (and all of them suck):
Note: This whole issue and many others arise from the custom element's asynchronous nature. They start in Note 2: The main issue is server generated code. Client side integrations like |
@jojackpot and @kenaxa suggest to mitigate this with skeleton views - including an SVG-animation loaded inline with the HTML markup (before CSS and JS). |
closing as new plib version is live. If issue is with v2 still relevant, please re-open |
Are you reporting a bug or a feature?
Expected Behavior
Each Web-Component should display it's content upon Connection and not any time sooner.
Actual Behavior
Each Web-Components renders it's children without any styles, once the custom element gets asynchronously connected it re-renders again, flattening it's local and light DOM and applies it's custom CSS styling. This process is visible as an ugly FOUC (Flash of unstyled content).
Steps to Reproduce the Problem
Specifications
Any browser
The text was updated successfully, but these errors were encountered: